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<ApiKeyPermissions>,
pub metadata: Option<JsValue>,
}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<ApiKeyPermissions>Resource permissions, available only to server callers.
metadata: Option<JsValue>Optional metadata; preservation of null matches the upstream wire contract.
Trait Implementations§
Source§impl Debug for CreateKeyRequest
impl Debug for CreateKeyRequest
Source§impl Default for CreateKeyRequest
impl Default for CreateKeyRequest
Source§impl<'de> Deserialize<'de> for CreateKeyRequest
impl<'de> Deserialize<'de> for CreateKeyRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for CreateKeyRequest
impl Serialize for CreateKeyRequest
Source§impl Validate for CreateKeyRequest
impl Validate for CreateKeyRequest
Auto Trait Implementations§
impl Freeze for CreateKeyRequest
impl RefUnwindSafe for CreateKeyRequest
impl Send for CreateKeyRequest
impl Sync for CreateKeyRequest
impl Unpin for CreateKeyRequest
impl UnsafeUnpin for CreateKeyRequest
impl UnwindSafe for CreateKeyRequest
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more