pub struct CreateKeyRequest {
pub mount: String,
pub name: String,
pub convergent_encryption: Option<bool>,
pub derived: Option<bool>,
pub exportable: Option<bool>,
pub allow_plaintext_backup: Option<bool>,
pub key_type: Option<KeyType>,
pub auto_rotate_period: Option<String>,
}
Expand description
§Create Key
This endpoint creates a new named encryption key of the specified type. The values set here cannot be changed after key creation.
- Path: {self.mount}/keys/{self.name}
- Method: POST
- Response: N/A
- Reference: https://developer.hashicorp.com/vault/api-docs/secret/transit#create-key
Fields§
§mount: String
§name: String
Specifies the name of the encryption key to create.
convergent_encryption: Option<bool>
If enabled, the key will support convergent encryption, where the same plaintext creates the same ciphertext. This requires derived to be set to true. When enabled, each encryption(/decryption/rewrap/datakey) operation will derive a nonce value rather than randomly generate it.
derived: Option<bool>
Specifies if key derivation is to be used. If enabled, all encrypt/decrypt requests to this named key must provide a context which is used for key derivation.
exportable: Option<bool>
Enables keys to be exportable. This allows for all the valid keys in the key ring to be exported. Once set, this cannot be disabled.
allow_plaintext_backup: Option<bool>
If set, enables taking backup of named key in the plaintext format. Once set, this cannot be disabled.
key_type: Option<KeyType>
Specifies the type of key to create.
auto_rotate_period: Option<String>
The period at which this key should be rotated automatically. Setting this to “0” (the default) will disable automatic key rotation. This value cannot be shorter than one hour.
Implementations§
source§impl CreateKeyRequest
impl CreateKeyRequest
pub fn builder() -> CreateKeyRequestBuilder
Trait Implementations§
source§impl Debug for CreateKeyRequest
impl Debug for CreateKeyRequest
source§impl Default for CreateKeyRequest
impl Default for CreateKeyRequest
source§fn default() -> CreateKeyRequest
fn default() -> CreateKeyRequest
source§impl Endpoint for CreateKeyRequest
impl Endpoint for CreateKeyRequest
source§const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
const REQUEST_BODY_TYPE: RequestType = RequestType::JSON
source§const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
const RESPONSE_BODY_TYPE: ResponseType = ResponseType::JSON
source§type Response = ()
type Response = ()
parse()
method is called.