Skip to main content

akeyless_api/models/
dynamic_secret_tmp_creds_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/// DynamicSecretTmpCredsUpdate : dynamicSecretTmpCredsUpdate is a command that updates dynamic secret temp creds
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DynamicSecretTmpCredsUpdate {
17    /// Host
18    #[serde(rename = "host")]
19    pub host: String,
20    /// Set output format to JSON
21    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
22    pub json: Option<bool>,
23    /// Dynamic secret name
24    #[serde(rename = "name")]
25    pub name: String,
26    /// New TTL in Minutes
27    #[serde(rename = "new-ttl-min")]
28    pub new_ttl_min: i64,
29    /// Tmp Creds ID
30    #[serde(rename = "tmp-creds-id")]
31    pub tmp_creds_id: String,
32    /// Authentication token (see `/auth` and `/configure`)
33    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
34    pub token: Option<String>,
35    /// The universal identity token, Required only for universal_identity authentication
36    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
37    pub uid_token: Option<String>,
38}
39
40impl DynamicSecretTmpCredsUpdate {
41    /// dynamicSecretTmpCredsUpdate is a command that updates dynamic secret temp creds
42    pub fn new(host: String, name: String, new_ttl_min: i64, tmp_creds_id: String) -> DynamicSecretTmpCredsUpdate {
43        DynamicSecretTmpCredsUpdate {
44            host,
45            json: None,
46            name,
47            new_ttl_min,
48            tmp_creds_id,
49            token: None,
50            uid_token: None,
51        }
52    }
53}
54