Skip to content

ITenantEgressPolicyStore

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The store for per-tenant model provider egress policies.

public interface ITenantEgressPolicyStore

Deletes a tenant’s policy, making the tenant unrestricted again.

ValueTask<bool> DeleteAsync(string tenantId, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

cancellationToken CancellationToken

The cancellation token.

ValueTask<bool>

true if a policy was found and deleted.

Reads a tenant’s policy.

ValueTask<TenantEgressPolicy?> GetAsync(string tenantId, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

cancellationToken CancellationToken

The cancellation token.

ValueTask<TenantEgressPolicy?>

The policy; null if the tenant has none saved, which means the tenant is unrestricted.

UpsertAsync(string, IReadOnlyList<string>, CancellationToken)

Section titled “ UpsertAsync(string, IReadOnlyList<string>, CancellationToken)”

Creates or replaces a tenant’s policy.

ValueTask<TenantEgressPolicy> UpsertAsync(string tenantId, IReadOnlyList<string> allowedProviders, CancellationToken cancellationToken = default)

tenantId string

The tenant identifier.

allowedProviders IReadOnlyList<string>

The closed set of allowed provider names.

cancellationToken CancellationToken

The cancellation token.

ValueTask<TenantEgressPolicy>

The saved policy.