Skip to main content

akeyless_api/models/
rotated_secret_create_splunk.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/// RotatedSecretCreateSplunk : rotatedSecretCreateSplunk is a command that creates a rotated secret for a Splunk target. Currently we support target-rotator behavior (rotate credentials on the target itself).
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RotatedSecretCreateSplunk {
17    /// Token audience for Splunk token creation (required for rotator-type=token)
18    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
19    pub audience: Option<String>,
20    /// The credentials to connect with use-user-creds/use-target-creds
21    #[serde(rename = "authentication-credentials", skip_serializing_if = "Option::is_none")]
22    pub authentication_credentials: Option<String>,
23    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
24    #[serde(rename = "auto-rotate", skip_serializing_if = "Option::is_none")]
25    pub auto_rotate: Option<String>,
26    /// Protection from accidental deletion of this object [true/false]
27    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
28    pub delete_protection: Option<String>,
29    /// Description of the object
30    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
31    pub description: Option<String>,
32    /// Token expiration date in YYYY-MM-DD format (required for rotator-type=token when manual rotation is selected and no existing token is provided). Time will be set to 00:00 UTC.
33    #[serde(rename = "expiration-date", skip_serializing_if = "Option::is_none")]
34    pub expiration_date: Option<String>,
35    /// Current Splunk HEC token value to store (relevant only for rotator-type=hec-token). If not provided, a new HEC input will be created in Splunk.
36    #[serde(rename = "hec-token", skip_serializing_if = "Option::is_none")]
37    pub hec_token: Option<String>,
38    /// Splunk HEC input name to manage  (required for rotator-type=hec-token)
39    #[serde(rename = "hec-token-name", skip_serializing_if = "Option::is_none")]
40    pub hec_token_name: Option<String>,
41    /// Additional custom fields to associate with the item
42    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
43    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
44    /// Set output format to JSON
45    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
46    pub json: Option<bool>,
47    /// The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
48    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
49    pub key: Option<String>,
50    /// Set the maximum number of versions, limited by the account settings defaults.
51    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
52    pub max_versions: Option<String>,
53    /// Rotated secret name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// The length of the password to be generated
57    #[serde(rename = "password-length", skip_serializing_if = "Option::is_none")]
58    pub password_length: Option<String>,
59    /// rotated-username password (relevant only for rotator-type=password)
60    #[serde(rename = "rotated-password", skip_serializing_if = "Option::is_none")]
61    pub rotated_password: Option<String>,
62    /// username to be rotated, if selected use-self-creds at rotator-creds-type, this username will try to rotate it's own password, if use-target-creds is selected, target credentials will be use to rotate the rotated-password (relevant only for rotator-type=password)
63    #[serde(rename = "rotated-username", skip_serializing_if = "Option::is_none")]
64    pub rotated_username: Option<String>,
65    /// How many days before the rotation of the item would you like to be notified
66    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
67    pub rotation_event_in: Option<Vec<String>>,
68    /// The Hour of the rotation in UTC
69    #[serde(rename = "rotation-hour", skip_serializing_if = "Option::is_none")]
70    pub rotation_hour: Option<i32>,
71    /// The number of days to wait between every automatic key rotation (1-365)
72    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
73    pub rotation_interval: Option<String>,
74    /// The rotator type. options: [target/password/token/hec-token]
75    #[serde(rename = "rotator-type")]
76    pub rotator_type: String,
77    /// Current Splunk authentication token to store (relevant only for rotator-type=token). If not provided, a new token will be created in Splunk.
78    #[serde(rename = "splunk-token", skip_serializing_if = "Option::is_none")]
79    pub splunk_token: Option<String>,
80    /// Add tags attached to this object
81    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
82    pub tags: Option<Vec<String>>,
83    /// The target name to associate
84    #[serde(rename = "target-name")]
85    pub target_name: String,
86    /// Authentication token (see `/auth` and `/configure`)
87    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
88    pub token: Option<String>,
89    /// Splunk token owner username (relevant only for rotator-type=token)
90    #[serde(rename = "token-owner", skip_serializing_if = "Option::is_none")]
91    pub token_owner: Option<String>,
92    /// The universal identity token, Required only for universal_identity authentication
93    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
94    pub uid_token: Option<String>,
95}
96
97impl RotatedSecretCreateSplunk {
98    /// rotatedSecretCreateSplunk is a command that creates a rotated secret for a Splunk target. Currently we support target-rotator behavior (rotate credentials on the target itself).
99    pub fn new(name: String, rotator_type: String, target_name: String) -> RotatedSecretCreateSplunk {
100        RotatedSecretCreateSplunk {
101            audience: None,
102            authentication_credentials: None,
103            auto_rotate: None,
104            delete_protection: None,
105            description: None,
106            expiration_date: None,
107            hec_token: None,
108            hec_token_name: None,
109            item_custom_fields: None,
110            json: None,
111            key: None,
112            max_versions: None,
113            name,
114            password_length: None,
115            rotated_password: None,
116            rotated_username: None,
117            rotation_event_in: None,
118            rotation_hour: None,
119            rotation_interval: None,
120            rotator_type,
121            splunk_token: None,
122            tags: None,
123            target_name,
124            token: None,
125            token_owner: None,
126            uid_token: None,
127        }
128    }
129}
130