pub struct CreateKeyRequest {
pub key_type: Option<String>,
pub description: Option<String>,
pub capabilities: Option<KeyCapabilities>,
pub expiry_seconds: Option<i64>,
pub scopes: Option<Vec<String>>,
pub tags: Option<Vec<String>>,
pub issuer: Option<String>,
pub subject: Option<String>,
pub audience: Option<String>,
pub custom_claim_rules: Option<BTreeMap<String, String>>,
pub unknown: Unknown,
}Expand description
What creating a key sends.
Not Key with the read-only fields dropped: the two disagree about
keyType, which narrows to CREATE_KEY_TYPES here, and about
capabilities, which a create must send and a listing never returns.
Fields§
§key_type: Option<String>One of CREATE_KEY_TYPES. An api token cannot be minted here.
description: Option<String>Up to 50 characters of letters, digits, hyphens and spaces.
capabilities: Option<KeyCapabilities>§expiry_seconds: Option<i64>Auth keys only; how long the key stays usable.
scopes: Option<Vec<String>>OAuth clients and federated identities: what their tokens may do.
Required when scopes includes devices:core or auth_keys.
issuer: Option<String>Federated identities only, all four of these.
subject: Option<String>§audience: Option<String>§custom_claim_rules: Option<BTreeMap<String, String>>§unknown: UnknownEverything the description did not mention, kept so that a control plane ahead of this build still answers usefully.
Implementations§
Trait Implementations§
Source§impl Clone for CreateKeyRequest
impl Clone for CreateKeyRequest
Source§impl Debug for CreateKeyRequest
impl Debug 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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CreateKeyRequest
impl PartialEq for CreateKeyRequest
Source§impl Serialize for CreateKeyRequest
impl Serialize for CreateKeyRequest
impl StructuralPartialEq 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<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
Mutably borrows from an owned value. Read more