pub struct CreateKeyRequest {Show 14 fields
pub config_id: Option<String>,
pub user_id: Option<String>,
pub organization_id: Option<String>,
pub name: Option<String>,
pub prefix: Option<String>,
pub expires_in: Option<f64>,
pub remaining: Option<f64>,
pub rate_limit_enabled: Option<bool>,
pub rate_limit_time_window: Option<f64>,
pub rate_limit_max: Option<f64>,
pub refill_interval: Option<f64>,
pub refill_amount: Option<f64>,
pub permissions: Option<HashMap<String, Vec<String>>>,
pub metadata: Option<Value>,
}Expand description
API key creation parameters for HTTP and trusted server callers.
Fields§
§config_id: Option<String>Configuration to use, or the default configuration when absent.
user_id: Option<String>User authorizing a server-side creation; HTTP clients must omit this field.
organization_id: Option<String>Organization owning the key when the configuration references organizations.
name: Option<String>Display name for the key.
prefix: Option<String>Prefix prepended to the generated key.
expires_in: Option<f64>Lifetime in seconds; null or absence uses the configured default.
remaining: Option<f64>Remaining uses, available only to trusted server callers.
rate_limit_enabled: Option<bool>Enable rate limiting for this key, available only to server callers.
rate_limit_time_window: Option<f64>Rate limit window in milliseconds, available only to server callers.
rate_limit_max: Option<f64>Requests per window, available only to server callers.
refill_interval: Option<f64>Refill interval in milliseconds, available only to server callers.
refill_amount: Option<f64>Uses restored per refill, available only to server callers.
permissions: Option<HashMap<String, Vec<String>>>Resource permissions, available only to server callers.
metadata: Option<Value>Optional metadata; preservation of null matches the upstream wire contract.