ApiKeyResponse
Rust struct goodmem::models::ApiKeyResponse: declaration, fields or variants, and implementations.
Struct ApiKeyResponse
goodmem::models::ApiKeyResponse
API key metadata without sensitive information.
pub struct ApiKeyResponse {
pub api_key_id: String,
pub subject_principal_id: String,
pub owner_principal_id: String,
pub authority_mode: ApiKeyAuthorityMode,
pub ceiling: Option<Vec<AccessPolicyRule>>,
pub ceiling_omitted: bool,
pub key_prefix: String,
pub status: ApiKeyResponseStatus,
pub lifecycle_state: ApiKeyResponseLifecycleState,
pub labels: BTreeMap<String, String>,
pub expires_at: Option<i64>,
pub valid_from: i64,
pub revoked_at: Option<i64>,
pub revoked_by_id: Option<String>,
pub last_used_at: Option<i64>,
pub created_at: i64,
pub updated_at: i64,
pub created_by_id: String,
pub updated_by_id: String,
}Referenced types: AccessPolicyRule, ApiKeyAuthorityMode, ApiKeyResponseLifecycleState, ApiKeyResponseStatus.
Fields
api_key_id
pub api_key_id: String
Unique identifier for the API key.
Wire name: apiKeyId.
subject_principal_id
pub subject_principal_id: String
Principal authenticated by this API key.
Wire name: subjectPrincipalId.
owner_principal_id
pub owner_principal_id: String
Principal that administratively owns this API key.
Wire name: ownerPrincipalId.
authority_mode
pub authority_mode: ApiKeyAuthorityMode
Immutable authority derivation mode.
Wire name: authorityMode.
ceiling
pub ceiling: Option<Vec<AccessPolicyRule>>
Complete immutable issuance ceiling; omitted only when ceilingOmitted is true.
Wire name: ceiling.
ceiling_omitted
pub ceiling_omitted: bool
True only when a BASIC list projection intentionally omitted the immutable ceiling.
Wire name: ceilingOmitted.
key_prefix
pub key_prefix: String
First few characters of the key for display/identification purposes.
Wire name: keyPrefix.
status
pub status: ApiKeyResponseStatus
Compatibility usability status. ACTIVE means USABLE; INACTIVE combines NOT_YET_VALID, EXPIRED, and REVOKED.
Wire name: status.
lifecycle_state
pub lifecycle_state: ApiKeyResponseLifecycleState
Precise lifecycle state at the response evaluation instant.
Wire name: lifecycleState.
labels
pub labels: BTreeMap<String, String>
User-defined labels for organization and filtering.
Wire name: labels.
expires_at
pub expires_at: Option<i64>
Expiration timestamp in milliseconds since epoch. If not provided, the key does not expire.
Wire name: expiresAt.
valid_from
pub valid_from: i64
Inclusive activation time in milliseconds since epoch.
Wire name: validFrom.
revoked_at
pub revoked_at: Option<i64>
Permanent revocation time in milliseconds since epoch.
Wire name: revokedAt.
revoked_by_id
pub revoked_by_id: Option<String>
Exact audit actor UUID that revoked this key.
Wire name: revokedById.
last_used_at
pub last_used_at: Option<i64>
Last time this API key was used, in milliseconds since epoch.
Wire name: lastUsedAt.
created_at
pub created_at: i64
When the API key was created, in milliseconds since epoch.
Wire name: createdAt.
updated_at
pub updated_at: i64
When the API key was last updated, in milliseconds since epoch.
Wire name: updatedAt.
created_by_id
pub created_by_id: String
Exact principal or API-key actor that created this API key.
Wire name: createdById.
updated_by_id
pub updated_by_id: String
Exact principal or API-key actor that last updated this API key.
Wire name: updatedById.
Implementations
validate
pub fn validate(&self) -> crate::Result<()>
Validate the request before sending, without making an HTTP call.
Trait implementations
Clone(derived)Default(derived)PartialEq(derived)Serialize(derived)impl<'de> Deserialize<'de> for ApiKeyResponseimpl std::fmt::Debug for ApiKeyResponse