Models¶
Pydantic models provide type-safe input validation for API requests. All models
inherit from BaseModel with extra="allow" for forward compatibility.
Base Model¶
- class netbird.models.common.BaseModel(**data)[source]¶
Bases:
BaseModelBase model for all NetBird API models.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
All models use these configurations:
extra="allow"- Accepts unknown fields from newer API versionsvalidate_assignment=True- Validates field assignments after creationuse_enum_values=True- Uses enum values instead of enum instancespopulate_by_name=True- Allows populating by field name or alias
Enumerations¶
- class netbird.models.common.UserRole(value)[source]¶
User role enumeration.
Values:
admin,user,owner- ADMIN = 'admin'¶
- USER = 'user'¶
- OWNER = 'owner'¶
- class netbird.models.common.UserStatus(value)[source]¶
User status enumeration.
Values:
active,disabled,invited- ACTIVE = 'active'¶
- DISABLED = 'disabled'¶
- INVITED = 'invited'¶
- class netbird.models.common.SetupKeyType(value)[source]¶
Setup key type enumeration.
Values:
reusable,one-off- REUSABLE = 'reusable'¶
- ONE_OFF = 'one-off'¶
- class netbird.models.common.NetworkType(value)[source]¶
Network type enumeration.
Values:
ipv4,ipv6,domain- IPV4 = 'ipv4'¶
- IPV6 = 'ipv6'¶
- DOMAIN = 'domain'¶
- class netbird.models.common.Protocol(value)[source]¶
Network protocol enumeration.
Values:
tcp,udp,icmp,all- TCP = 'tcp'¶
- UDP = 'udp'¶
- ICMP = 'icmp'¶
- ALL = 'all'¶
- class netbird.models.common.PolicyAction(value)[source]¶
Policy action enumeration.
Values:
accept,drop- ACCEPT = 'accept'¶
- DROP = 'drop'¶
Account Models¶
- class netbird.models.account.Account(**data)[source]¶
NetBird account model.
- id¶
Unique account identifier
- domain¶
Account domain
- domain_category¶
Domain category
- created_at¶
Account creation timestamp
- created_by¶
User who created the account
- settings¶
Account settings
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.account.AccountSettings(**data)[source]¶
Account settings configuration.
- peer_login_expiration¶
Peer login expiration settings
- peer_login_expiration_enabled¶
Whether peer login expiration is enabled
- peer_inactivity_expiration_enabled¶
Whether peer inactivity expiration is enabled
- user_view_restrictions¶
User view restriction settings
- group_propagation_enabled¶
Whether group propagation is enabled
- jwt_groups_enabled¶
Whether JWT groups are enabled
- jwt_groups_claim_name¶
JWT groups claim name
- dns_resolution_enabled¶
Whether DNS resolution is enabled
- network_traffic_logging_enabled¶
Whether network traffic logging is enabled
- lazy_connection_enabled¶
Whether lazy connection is enabled
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
User Models¶
- class netbird.models.user.User(**data)[source]¶
NetBird user model.
- id¶
Unique user identifier
- email¶
User email address
- name¶
User display name
- role¶
User role
- status¶
User status (active, disabled, invited)
- auto_groups¶
List of auto-assigned group IDs
- is_service_user¶
Whether this is a service user
- is_blocked¶
Whether the user is blocked
- issued¶
When the user was created
- permissions¶
User permissions
- is_current¶
Whether this is the current user (from get_current endpoint)
- last_login¶
Last login timestamp
- id: ResourceId¶
- status: UserStatus¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.user.UserCreate(**data)[source]¶
Model for creating a new user.
- email¶
User email address
- name¶
User display name
- role¶
User role (admin, user, owner)
- auto_groups¶
List of group IDs to auto-assign
- is_service_user¶
Whether this is a service user
- is_blocked¶
Whether the user is blocked
from netbird.models import UserCreate user = UserCreate( email="alice@company.com", name="Alice", role="admin", # or UserRole.ADMIN is_service_user=False, auto_groups=["default-group"] )
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.user.UserUpdate(**data)[source]¶
Model for updating an existing user.
- name¶
User display name
- role¶
User role
- auto_groups¶
List of group IDs to auto-assign
- is_blocked¶
Whether the user is blocked
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.user.UserInvite(**data)[source]¶
User invite model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.user.UserInviteCreate(**data)[source]¶
Model for creating a user invite.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Token Models¶
- class netbird.models.token.Token(**data)[source]¶
NetBird token model.
- id¶
Unique token identifier
- name¶
Token name
- creation_date¶
When the token was created
- expiration_date¶
When the token expires
- created_by¶
User ID who created the token
- last_used¶
When the token was last used
- id: ResourceId¶
- created_by: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.token.TokenCreate(**data)[source]¶
Model for creating a new token.
- name¶
Token name
- expires_in¶
Token expiration in days (1-365)
expires_inmust be between 1 and 365 days.- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Peer Models¶
- class netbird.models.peer.Peer(**data)[source]¶
NetBird peer model.
- id¶
Unique peer identifier
- name¶
Peer name
- ip¶
Peer IP address
- connection_ip¶
Connection IP address
- connected¶
Whether peer is connected
- last_seen¶
Last seen timestamp
- os¶
Operating system
- version¶
NetBird version
- groups¶
List of group objects with details
- user_id¶
Associated user ID
- hostname¶
Peer hostname
- ui_version¶
UI version
- dns_label¶
DNS label
- ssh_enabled¶
Whether SSH is enabled
- login_expiration_enabled¶
Whether login expiration is enabled
- login_expired¶
Whether login has expired
- approval_required¶
Whether approval is required
- accessible_peers_count¶
Number of accessible peers
- city_name¶
Geographic city name
- country_code¶
Geographic country code
- ephemeral¶
Whether peer is ephemeral
- extra_dns_labels¶
Additional DNS labels
- geoname_id¶
Geographic name ID
- inactivity_expiration_enabled¶
Whether inactivity expiration is enabled
- kernel_version¶
OS kernel version
- last_login¶
Last login timestamp
- serial_number¶
Device serial number
- id: ResourceId¶
- ip: IPvAnyAddress¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.peer.PeerUpdate(**data)[source]¶
Model for updating a peer.
- name¶
Peer name
- ssh_enabled¶
Whether SSH is enabled
- login_expiration_enabled¶
Whether login expiration is enabled
- inactivity_expiration_enabled¶
Whether inactivity expiration is enabled
- approval_required¶
Whether approval is required (cloud-only)
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Setup Key Models¶
- class netbird.models.setup_key.SetupKey(**data)[source]¶
NetBird setup key model.
- id¶
Unique setup key identifier
- key¶
The actual setup key value
- name¶
Setup key name
- expires¶
Expiration timestamp
- type¶
Key type
- valid¶
Whether the key is valid
- revoked¶
Whether the key is revoked
- used_times¶
Number of times the key has been used
- last_used¶
When the key was last used
- state¶
Key state
- auto_groups¶
Auto-assigned group IDs
- updated_at¶
Last update timestamp
- usage_limit¶
Usage limit
- ephemeral¶
Whether peers are ephemeral
- allow_extra_dns_labels¶
Whether extra DNS labels are allowed
- id: ResourceId¶
- type: SetupKeyType¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.setup_key.SetupKeyCreate(**data)[source]¶
Model for creating a setup key.
- name¶
Setup key name
- type¶
Key type (reusable or one-off)
- expires_in¶
Expiration time in seconds
- auto_groups¶
Group IDs to auto-assign
- usage_limit¶
Maximum number of uses
- ephemeral¶
Whether peers using this key are ephemeral
- allow_extra_dns_labels¶
Allow extra DNS labels
- type: SetupKeyType¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.setup_key.SetupKeyUpdate(**data)[source]¶
Model for updating a setup key.
- revoked¶
Whether the key is revoked
- auto_groups¶
Group IDs to auto-assign
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Group Models¶
- class netbird.models.group.Group(**data)[source]¶
NetBird group model.
- id¶
Unique group identifier
- name¶
Group name
- peers_count¶
Number of peers in group
- peers¶
List of peer objects with details
- resources¶
List of network resource objects
- resources_count¶
Number of resources in group
- issued¶
Creation timestamp
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.group.GroupCreate(**data)[source]¶
Model for creating a group.
- name¶
Group name
- peers¶
List of peer IDs to include
- resources¶
List of network resources
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.group.GroupUpdate(**data)[source]¶
Model for updating a group.
- name¶
Group name
- peers¶
List of peer IDs to include
- resources¶
List of network resources
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Network Models¶
- class netbird.models.network.Network(**data)[source]¶
NetBird network model.
- id¶
Unique network identifier
- name¶
Network name
- description¶
Network description
- routers¶
List of router IDs
- resources¶
List of resource IDs
- policies¶
List of associated policy IDs
- routing_peers_count¶
Number of routing peers
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.network.NetworkCreate(**data)[source]¶
Model for creating a network.
- name¶
Network name
- description¶
Network description
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.network.NetworkUpdate(**data)[source]¶
Model for updating a network.
- name¶
Network name
- description¶
Network description
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.network.NetworkResource(**data)[source]¶
Network resource model.
- id¶
Resource identifier
- name¶
Resource name
- description¶
Resource description
- address¶
Resource address
- enabled¶
Whether resource is enabled
- groups¶
Associated group IDs
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.network.NetworkRouter(**data)[source]¶
Network router model.
- id¶
Router identifier
- name¶
Router name
- description¶
Router description
- peer¶
Associated peer ID
- peer_groups¶
Associated peer group IDs
- metric¶
Router metric
- masquerade¶
Whether masquerading is enabled
- enabled¶
Whether router is enabled
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Policy Models¶
- class netbird.models.policy.Policy(**data)[source]¶
NetBird policy model.
- id¶
Unique policy identifier
- name¶
Policy name
- description¶
Policy description
- enabled¶
Whether policy is enabled
- source_posture_checks¶
Source posture check IDs
- rules¶
List of policy rules
- id: ResourceId¶
- rules: List[PolicyRule]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.policy.PolicyCreate(**data)[source]¶
Model for creating a policy.
- name¶
Policy name
- description¶
Policy description
- enabled¶
Whether policy is enabled
- source_posture_checks¶
Source posture check IDs
- rules¶
List of policy rules
- rules: List[PolicyRule]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.policy.PolicyRule(**data)[source]¶
Policy rule model.
- id¶
Rule identifier
- name¶
Rule name
- description¶
Rule description
- enabled¶
Whether rule is enabled
- action¶
Policy action (accept/drop)
- protocol¶
Network protocol
- ports¶
List of ports
- sources¶
Source groups
- destinations¶
Destination groups
- bidirectional¶
Whether rule is bidirectional
- action: PolicyAction¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.policy.PolicyUpdate(**data)[source]¶
Model for updating a policy.
- name¶
Policy name
- description¶
Policy description
- enabled¶
Whether policy is enabled
- source_posture_checks¶
Source posture check IDs
- rules¶
List of policy rules
- rules: List[PolicyRule] | None¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Route Models¶
Deprecated since version Routes: are deprecated. Use Networks API instead.
- class netbird.models.route.Route(**data)[source]¶
NetBird route model.
- id¶
Unique route identifier
- description¶
Route description
- network_id¶
Network identifier
- enabled¶
Whether route is enabled
- peer¶
Peer ID for the route
- peer_groups¶
Peer group IDs for the route
- network¶
Network address
- network_type¶
Network type
- domains¶
Domain list for domain routes
- metric¶
Route metric
- masquerade¶
Whether masquerading is enabled
- groups¶
Group IDs that can access this route
- keep_route¶
Whether to keep route on disconnect
- access_control_groups¶
Access control group IDs
- id: ResourceId¶
- network_type: NetworkType¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.route.RouteCreate(**data)[source]¶
Model for creating a route.
- description¶
Route description
- network_id¶
Network identifier
- enabled¶
Whether route is enabled
- peer¶
Peer ID for the route
- peer_groups¶
Peer group IDs for the route
- network¶
Network address
- network_type¶
Network type (ipv4, ipv6, domain)
- domains¶
Domain list for domain routes
- metric¶
Route metric
- masquerade¶
Whether masquerading is enabled
- groups¶
Group IDs that can access this route
- keep_route¶
Whether to keep route on disconnect
- access_control_groups¶
Access control group IDs
- network_type: NetworkType¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.route.RouteUpdate(**data)[source]¶
Model for updating a route.
- description¶
Route description
- enabled¶
Whether route is enabled
- peer¶
Peer ID for the route
- peer_groups¶
Peer group IDs for the route
- network¶
Network address
- domains¶
Domain list for domain routes
- metric¶
Route metric
- masquerade¶
Whether masquerading is enabled
- groups¶
Group IDs that can access this route
- keep_route¶
Whether to keep route on disconnect
- access_control_groups¶
Access control group IDs
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
DNS Models¶
- class netbird.models.dns.DNSNameserverGroup(**data)[source]¶
DNS nameserver group model.
- id¶
Unique nameserver group identifier
- name¶
Nameserver group name
- description¶
Nameserver group description
- nameservers¶
List of nameserver IP addresses
- enabled¶
Whether the nameserver group is enabled
- groups¶
Group IDs that use this nameserver group
- domains¶
Domain list for this nameserver group
- search_domains_enabled¶
Whether search domains are enabled
- id: ResourceId¶
- nameservers: List[IPvAnyAddress]¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns.DNSSettings(**data)[source]¶
DNS settings model.
- disabled_management_groups¶
Groups with disabled DNS management
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
DNS Zone Models¶
- class netbird.models.dns_zone.DNSZone(**data)[source]¶
NetBird DNS zone model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns_zone.DNSZoneCreate(**data)[source]¶
Model for creating a DNS zone.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns_zone.DNSZoneUpdate(**data)[source]¶
Model for updating a DNS zone.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns_zone.DNSRecord(**data)[source]¶
NetBird DNS record model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns_zone.DNSRecordCreate(**data)[source]¶
Model for creating a DNS record.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.dns_zone.DNSRecordUpdate(**data)[source]¶
Model for updating a DNS record.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Event Models¶
- class netbird.models.event.AuditEvent(**data)[source]¶
Audit event model.
- timestamp¶
Event timestamp
- activity¶
Activity description
- activity_code¶
Activity code
- id¶
Event ID
- initiator_id¶
ID of the initiator
- initiator_email¶
Email of the initiator
- initiator_name¶
Name of the initiator
- target_id¶
ID of the target
- meta¶
Additional event metadata
- initiator_id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.event.NetworkTrafficEvent(**data)[source]¶
Network traffic event model.
- timestamp¶
Event timestamp
- source_ip¶
Source IP address
- destination_ip¶
Destination IP address
- source_port¶
Source port
- destination_port¶
Destination port
- protocol¶
Network protocol
- bytes_sent¶
Number of bytes sent
- bytes_received¶
Number of bytes received
- user_id¶
Associated user ID
- peer_id¶
Associated peer ID
- reporter_id¶
Reporter peer ID
- policy_id¶
Applied policy ID
- direction¶
Traffic direction
- connection_type¶
Connection type (relay/p2p)
- allowed¶
Whether traffic was allowed
- source_ip: IPvAnyAddress¶
- destination_ip: IPvAnyAddress¶
- peer_id: ResourceId¶
- reporter_id: ResourceId¶
- direction: TrafficDirection¶
- connection_type: ConnectionType¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Posture Check Models¶
- class netbird.models.posture_check.PostureCheck(**data)[source]¶
NetBird posture check model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.posture_check.PostureCheckCreate(**data)[source]¶
Model for creating a posture check.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.posture_check.PostureCheckUpdate(**data)[source]¶
Model for updating a posture check.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Identity Provider Models¶
- class netbird.models.identity_provider.IdentityProvider(**data)[source]¶
NetBird identity provider model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.identity_provider.IdentityProviderCreate(**data)[source]¶
Model for creating an identity provider.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.identity_provider.IdentityProviderUpdate(**data)[source]¶
Model for updating an identity provider.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Job Models¶
- class netbird.models.job.Job(**data)[source]¶
NetBird job model.
- id: ResourceId¶
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class netbird.models.job.JobCreate(**data)[source]¶
Model for creating a job.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Type Aliases¶
ResourceId- String type for resource identifiersTimestamp- Datetime type for timestamps