Skip to main content

akeyless_api/models/
usc_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/// UscUpdate : uscUpdate is a command that updates a secret in a Universal Secrets Connector
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UscUpdate {
17    /// Use this option if the universal secrets 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 universal secrets
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// Set output format to JSON
24    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
25    pub json: Option<bool>,
26    /// The namespace (relevant for Hashi vault target)
27    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
28    pub namespace: Option<String>,
29    /// Optional, the passphrase that protects the private key within the pfx certificate (Relevant only for Azure KV certificates)
30    #[serde(rename = "pfx-password", skip_serializing_if = "Option::is_none")]
31    pub pfx_password: Option<String>,
32    /// The universal secrets id (or name, for AWS, Azure, K8s or Hashi vault targets) to update
33    #[serde(rename = "secret-id")]
34    pub secret_id: String,
35    /// Tags for the universal secrets
36    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
37    pub tags: Option<std::collections::HashMap<String, String>>,
38    /// Authentication token (see `/auth` and `/configure`)
39    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
40    pub token: Option<String>,
41    /// The universal identity token, Required only for universal_identity authentication
42    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
43    pub uid_token: Option<String>,
44    /// Optional, The name of the remote key that used to encrypt the secret value (if empty, the default key will be used)
45    #[serde(rename = "usc-encryption-key", skip_serializing_if = "Option::is_none")]
46    pub usc_encryption_key: Option<String>,
47    /// Name of the Universal Secrets Connector item
48    #[serde(rename = "usc-name")]
49    pub usc_name: String,
50    /// Value of the universal secrets item, either text or base64 encoded binary
51    #[serde(rename = "value")]
52    pub value: String,
53}
54
55impl UscUpdate {
56    /// uscUpdate is a command that updates a secret in a Universal Secrets Connector
57    pub fn new(secret_id: String, usc_name: String, value: String) -> UscUpdate {
58        UscUpdate {
59            binary_value: None,
60            description: None,
61            json: None,
62            namespace: None,
63            pfx_password: None,
64            secret_id,
65            tags: None,
66            token: None,
67            uid_token: None,
68            usc_encryption_key: None,
69            usc_name,
70            value,
71        }
72    }
73}
74