Skip to main content

akeyless_api/models/
esm_update.rs

1/*
2 * Akeyless API
3 *
4 * The purpose of this application is to provide access to Akeyless API.
5 *
6 * The version of the OpenAPI document: 3.0
7 * Contact: support@akeyless.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// EsmUpdate : esmUpdate is a command that updates a secret in an External Secrets Manager
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct EsmUpdate {
17    /// Use this option if the external secret value is a base64 encoded binary
18    #[serde(rename = "binary-value", skip_serializing_if = "Option::is_none")]
19    pub binary_value: Option<bool>,
20    /// Description of the external secret
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// Name of the External Secrets Manager item
24    #[serde(rename = "esm-name")]
25    pub esm_name: String,
26    /// Set output format to JSON
27    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
28    pub json: Option<bool>,
29    /// The external secret id (or name, for AWS, Azure or K8s targets) to update
30    #[serde(rename = "secret-id")]
31    pub secret_id: String,
32    /// Tags for the external secret
33    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
34    pub tags: Option<std::collections::HashMap<String, String>>,
35    /// Authentication token (see `/auth` and `/configure`)
36    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
37    pub token: Option<String>,
38    /// The universal identity token, Required only for universal_identity authentication
39    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
40    pub uid_token: Option<String>,
41    /// Value of the external secret item, either text or base64 encoded binary
42    #[serde(rename = "value")]
43    pub value: String,
44}
45
46impl EsmUpdate {
47    /// esmUpdate is a command that updates a secret in an External Secrets Manager
48    pub fn new(esm_name: String, secret_id: String, value: String) -> EsmUpdate {
49        EsmUpdate {
50            binary_value: None,
51            description: None,
52            esm_name,
53            json: None,
54            secret_id,
55            tags: None,
56            token: None,
57            uid_token: None,
58            value,
59        }
60    }
61}
62