Skip to main content

WamiAction

Enum WamiAction 

Source
pub enum WamiAction {
Show 85 variants All, ServiceAll(WamiServicePrefix), PlatformAdmin, PlatformViewSettings, PlatformUpdateSettings, PlatformViewAuditLog, TenantCreate, TenantConfigure, TenantManageMembers, TenantSuspend, TenantResume, TenantList, TenantRead, TenantUpdate, TenantDelete, TenantCreateSubTenant, TenantManageUsers, TenantManageRoles, TenantManagePolicies, IamCreateUser, IamDeleteUser, IamReadUser, IamUpdateUser, IamListUsers, IamCreateGroup, IamDeleteGroup, IamManageGroupMembers, IamCreateRole, IamDeleteRole, IamReadRole, IamAssumeRole, IamCreatePolicy, IamDeletePolicy, IamReadPolicy, IamAttachPolicy, IamDetachPolicy, IamSetBoundary, IamManageCredentials, DbQuery, DbWrite, DbDelete, DbCreate, DbDrop, DbList, DbConfigureAccess, DbImport, DbExport, ChatSend, ChatReadHistory, ChatDeleteConversation, ChatStream, PersonaCreate, PersonaDelete, PersonaRead, PersonaUpdate, PersonaList, PersonaInvoke, RoomCreate, RoomDelete, RoomJoin, RoomRead, RoomSend, RoomManage, InferenceListModels, InferenceInvoke, InferenceConfigureRouter, InferenceViewUsage, AnalyticsViewUsage, AnalyticsViewConversations, AnalyticsExport, AnalyticsViewActivity, IntegrationCreate, IntegrationDelete, IntegrationConfigure, IntegrationList, IntegrationReceive, IntegrationSend, CognitiveRead, CognitiveWrite, CognitiveReset, GdprGrantConsent, GdprRevokeConsent, GdprExportData, GdprEraseData, GdprViewAudit,
}
Expand description

Exhaustive action vocabulary for the obrain ecosystem.

Actions are organized by service prefix:

  • platform:* — Platform-level administration
  • tenant:* — Tenant hierarchy management
  • iam:* — Identity & access management
  • db:* — Database / knowledge store operations
  • chat:* — Chat and conversation
  • persona:* — Persona management
  • room:* — Room / channel management
  • inference:* — Model and inference operations
  • analytics:* — Analytics and reporting
  • integration:* — External platform integrations
  • cognitive:* — Cognitive layer (brain, memory)
  • gdpr:* — GDPR / data privacy operations

Variants§

§

All

Matches every action (*)

§

ServiceAll(WamiServicePrefix)

Matches every action within a service prefix (service:*)

§

PlatformAdmin

Full platform administration

§

PlatformViewSettings

View platform settings and stats

§

PlatformUpdateSettings

Update platform configuration

§

PlatformViewAuditLog

View platform audit logs

§

TenantCreate

Create a new tenant

§

TenantConfigure

Configure tenant domain and port

§

TenantManageMembers

Manage tenant members (add, remove, ban)

§

TenantSuspend

Suspend a tenant

Its opposite is TenantResume and not this: cutting access off and giving it back are not one permission. A tenant is usually suspended FOR a reason — unpaid, abusive, breached — and whoever may cut it off is not automatically whoever may decide the reason has passed.

§

TenantResume

Lift a suspension

§

TenantList

List all tenants (platform-level)

§

TenantRead

Read tenant info

§

TenantUpdate

Update tenant

§

TenantDelete

Delete tenant

§

TenantCreateSubTenant

Create sub-tenant

§

TenantManageUsers

Manage users within tenant

§

TenantManageRoles

Manage roles within tenant

§

TenantManagePolicies

Manage policies within tenant

§

IamCreateUser

Create IAM user

§

IamDeleteUser

Delete IAM user

§

IamReadUser

Read IAM user info

§

IamUpdateUser

Update IAM user

§

IamListUsers

List IAM users

§

IamCreateGroup

Create IAM group

§

IamDeleteGroup

Delete IAM group

§

IamManageGroupMembers

Manage group membership

§

IamCreateRole

Create IAM role

§

IamDeleteRole

Delete IAM role

§

IamReadRole

Read IAM role

§

IamAssumeRole

Assume IAM role

§

IamCreatePolicy

Create an IAM policy

Attaching it is IamAttachPolicy, which exists. Saying both here would make that one grant nothing anybody could not already do.

§

IamDeletePolicy

Delete an IAM policy

Detaching it is IamDetachPolicy, for the same reason.

§

IamReadPolicy

Read IAM policy

§

IamAttachPolicy

Attach policy to user/group/role

§

IamDetachPolicy

Detach policy from user/group/role

§

IamSetBoundary

Set permissions boundary

§

IamManageCredentials

Manage credentials (access keys, MFA, etc.)

§

DbQuery

Query / read from a knowledge database

§

DbWrite

Write / insert into a knowledge database

§

DbDelete

Delete data from a knowledge database

§

DbCreate

Create a new knowledge database

§

DbDrop

Drop a knowledge database

§

DbList

List available databases

§

DbConfigureAccess

Configure database access policies

§

DbImport

Import data into a database

§

DbExport

Export data from a database

§

ChatSend

Send a chat message

§

ChatReadHistory

Read chat history

§

ChatDeleteConversation

Delete a conversation

§

ChatStream

Use streaming chat (SSE)

§

PersonaCreate

Create a persona

§

PersonaDelete

Delete a persona

§

PersonaRead

Read persona info

§

PersonaUpdate

Update persona configuration

§

PersonaList

List personas

§

PersonaInvoke

Invoke / use a persona in chat

§

RoomCreate

Create a room / channel

§

RoomDelete

Delete a room

§

RoomJoin

Join a room

§

RoomRead

Read room messages

§

RoomSend

Send message to room

§

RoomManage

Manage room settings

§

InferenceListModels

List available models

§

InferenceInvoke

Invoke a model (generate)

§

InferenceConfigureRouter

Configure model routing

§

InferenceViewUsage

View model usage / costs

§

AnalyticsViewUsage

View usage analytics

§

AnalyticsViewConversations

View conversation analytics

§

AnalyticsExport

Export analytics reports

§

AnalyticsViewActivity

View user activity

§

IntegrationCreate

Create an integration bridge

§

IntegrationDelete

Delete an integration bridge

§

IntegrationConfigure

Configure integration settings

§

IntegrationList

List integrations

§

IntegrationReceive

Receive inbound messages (webhook)

§

IntegrationSend

Send outbound messages

§

CognitiveRead

Read cognitive state (brain, memory)

§

CognitiveWrite

Write / update cognitive state

§

CognitiveReset

Reset cognitive state

§

GdprGrantConsent

Grant data consent

§

GdprRevokeConsent

Revoke data consent

§

GdprExportData

Export personal data

§

GdprEraseData

Erase personal data (right to be forgotten)

§

GdprViewAudit

View audit log

Implementations§

Source§

impl WamiAction

Source

pub fn as_str(&self) -> &'static str

String representation in service:Operation format.

Source

pub fn prefix(&self) -> Option<WamiServicePrefix>

Returns the service prefix for this action.

Source§

impl WamiAction

Source

pub fn matches(&self, requested: &WamiAction) -> bool

Check whether self (a policy action pattern) matches a requested action.

Matching rules:

  • All (*) matches everything
  • ServiceAll(prefix) (service:*) matches any action in that service
  • Exact variant matches only itself

This also supports string-based matching for backward compatibility with existing Vec<String> policy statements.

Source

pub fn matches_str(policy_action: &str, requested: &str) -> bool

Check whether a policy action string matches a requested action string.

This provides backward compatibility with the existing Vec<String> in PolicyStatement without requiring a full migration to the enum.

Supports: "*", "service:*", and exact strings like "db:Query".

Trait Implementations§

Source§

impl Clone for WamiAction

Source§

fn clone(&self) -> WamiAction

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for WamiAction

Source§

impl Debug for WamiAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for WamiAction

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for WamiAction

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for WamiAction

Source§

impl FromStr for WamiAction

Source§

type Err = ActionParseError

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
Source§

impl Hash for WamiAction

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for WamiAction

Source§

fn eq(&self, other: &WamiAction) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for WamiAction

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WamiAction

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.