ITenantEgressPolicyStore
Namespace AgentPrism · Assembly
AgentPrism.Abstractions.dllThe store for per-tenant model provider egress policies.
public interface ITenantEgressPolicyStoreMethods
Section titled “Methods”DeleteAsync(string, CancellationToken)
Section titled “ DeleteAsync(string, CancellationToken)”Deletes a tenant’s policy, making the tenant unrestricted again.
ValueTask<bool> DeleteAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”true if a policy was found and deleted.
GetAsync(string, CancellationToken)
Section titled “ GetAsync(string, CancellationToken)”Reads a tenant’s policy.
ValueTask<TenantEgressPolicy?> GetAsync(string tenantId, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”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)Parameters
Section titled “Parameters”tenantId string
The tenant identifier.
allowedProviders IReadOnlyList<string>
The closed set of allowed provider names.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”The saved policy.