Skip to main content

akeyless_api/models/
usc_create.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/// UscCreate : uscCreate is a command that creates a new secret in a Universal Secrets Connector
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UscCreate {
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    #[serde(rename = "object-type", skip_serializing_if = "Option::is_none")]
30    pub object_type: Option<String>,
31    /// Optional, the passphrase that protects the private key within the pfx certificate (Relevant only for Azure KV certificates)
32    #[serde(rename = "pfx-password", skip_serializing_if = "Option::is_none")]
33    pub pfx_password: Option<String>,
34    /// Optional, create secret in a specific region (GCP only). If empty, a global secret will be created (provider default).
35    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
36    pub region: Option<String>,
37    /// Name for the new universal secrets
38    #[serde(rename = "secret-name")]
39    pub secret_name: String,
40    /// Tags for the universal secrets
41    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
42    pub tags: Option<std::collections::HashMap<String, String>>,
43    /// Authentication token (see `/auth` and `/configure`)
44    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
45    pub token: Option<String>,
46    /// The universal identity token, Required only for universal_identity authentication
47    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
48    pub uid_token: Option<String>,
49    /// Optional, The name of the remote key that used to encrypt the secret value (if empty, the default key will be used)
50    #[serde(rename = "usc-encryption-key", skip_serializing_if = "Option::is_none")]
51    pub usc_encryption_key: Option<String>,
52    /// Name of the Universal Secrets Connector item
53    #[serde(rename = "usc-name")]
54    pub usc_name: String,
55    /// Value of the universal secrets item, either text or base64 encoded binary
56    #[serde(rename = "value")]
57    pub value: String,
58}
59
60impl UscCreate {
61    /// uscCreate is a command that creates a new secret in a Universal Secrets Connector
62    pub fn new(secret_name: String, usc_name: String, value: String) -> UscCreate {
63        UscCreate {
64            binary_value: None,
65            description: None,
66            json: None,
67            namespace: None,
68            object_type: None,
69            pfx_password: None,
70            region: None,
71            secret_name,
72            tags: None,
73            token: None,
74            uid_token: None,
75            usc_encryption_key: None,
76            usc_name,
77            value,
78        }
79    }
80}
81