Expand description
Amazon Verified Permissions (AVP) policy evaluator for Code Mode.
Provides AvpPolicyEvaluator — an implementation of PolicyEvaluator backed by
AWS Verified Permissions. Supports both GraphQL (evaluate_operation) and JavaScript
(evaluate_script) policy evaluation.
§Usage
ⓘ
use pmcp_code_mode::{AvpClient, AvpConfig, AvpPolicyEvaluator};
use std::sync::Arc;
// Construct from POLICY_STORE_ID env var (injected by pmcp.run platform)
let config = AvpConfig {
policy_store_id: std::env::var("POLICY_STORE_ID").unwrap(),
region: None, // uses default AWS region
};
let client = AvpClient::new(config).await?;
let evaluator = Arc::new(AvpPolicyEvaluator::new(client));§Feature Gate
This module requires the avp feature:
pmcp-code-mode = { version = "0.4.0", features = ["avp"] }Structs§
- AvpClient
- AVP client for Code Mode policy evaluation.
- AvpConfig
- Configuration for the AVP client.
- AvpPolicy
Evaluator - AVP-based policy evaluator implementing the
PolicyEvaluatortrait.
Enums§
- AvpError
- Error type for AVP operations.