Skip to main content

akeyless_api/models/
rotated_secret_create_azure.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RotatedSecretCreateAzure {
16    /// API ID to rotate (relevant only for rotator-type=api-key)
17    #[serde(rename = "api-id", skip_serializing_if = "Option::is_none")]
18    pub api_id: Option<String>,
19    /// API key to rotate (relevant only for rotator-type=api-key)
20    #[serde(rename = "api-key", skip_serializing_if = "Option::is_none")]
21    pub api_key: Option<String>,
22    /// Id of the azure app that hold the serect to be rotated (relevant only for rotator-type=api-key & authentication-credentials=use-target-creds)
23    #[serde(rename = "application-id", skip_serializing_if = "Option::is_none")]
24    pub application_id: Option<String>,
25    /// The credentials to connect with use-user-creds/use-target-creds
26    #[serde(rename = "authentication-credentials", skip_serializing_if = "Option::is_none")]
27    pub authentication_credentials: Option<String>,
28    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
29    #[serde(rename = "auto-rotate", skip_serializing_if = "Option::is_none")]
30    pub auto_rotate: Option<String>,
31    /// Protection from accidental deletion of this object [true/false]
32    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
33    pub delete_protection: Option<String>,
34    /// Description of the object
35    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
36    pub description: Option<String>,
37    /// If set, explicitly provide the storage account details [true/false]
38    #[serde(rename = "explicitly-set-sa", skip_serializing_if = "Option::is_none")]
39    pub explicitly_set_sa: Option<String>,
40    /// Enable graceful rotation (keep both versions temporarily). When enabled, a new secret version is created while the previous version is kept for the grace period, so both versions exist for a limited time. [true/false]
41    #[serde(rename = "grace-rotation", skip_serializing_if = "Option::is_none")]
42    pub grace_rotation: Option<String>,
43    /// The Hour of the grace rotation in UTC
44    #[serde(rename = "grace-rotation-hour", skip_serializing_if = "Option::is_none")]
45    pub grace_rotation_hour: Option<i32>,
46    /// The number of days to wait before deleting the old key (must be bigger than rotation-interval)
47    #[serde(rename = "grace-rotation-interval", skip_serializing_if = "Option::is_none")]
48    pub grace_rotation_interval: Option<String>,
49    /// When to create the new version relative to the rotation date [after/before]
50    #[serde(rename = "grace-rotation-timing", skip_serializing_if = "Option::is_none")]
51    pub grace_rotation_timing: Option<String>,
52    /// Additional custom fields to associate with the item
53    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
54    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
55    /// Set output format to JSON
56    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
57    pub json: Option<bool>,
58    /// The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
59    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
60    pub key: Option<String>,
61    /// Set the maximum number of versions, limited by the account settings defaults.
62    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
63    pub max_versions: Option<String>,
64    /// Rotated secret name
65    #[serde(rename = "name")]
66    pub name: String,
67    /// The length of the password to be generated
68    #[serde(rename = "password-length", skip_serializing_if = "Option::is_none")]
69    pub password_length: Option<String>,
70    /// The resource group name (only relevant when explicitly-set-sa=true)
71    #[serde(rename = "resource-group-name", skip_serializing_if = "Option::is_none")]
72    pub resource_group_name: Option<String>,
73    /// The name of the storage account (only relevant when explicitly-set-sa=true)
74    #[serde(rename = "resource-name", skip_serializing_if = "Option::is_none")]
75    pub resource_name: Option<String>,
76    /// Rotate the value of the secret after SRA session ends [true/false]
77    #[serde(rename = "rotate-after-disconnect", skip_serializing_if = "Option::is_none")]
78    pub rotate_after_disconnect: Option<String>,
79    /// How many days before the rotation of the item would you like to be notified
80    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
81    pub rotation_event_in: Option<Vec<String>>,
82    /// The Hour of the rotation in UTC
83    #[serde(rename = "rotation-hour", skip_serializing_if = "Option::is_none")]
84    pub rotation_hour: Option<i32>,
85    /// The number of days to wait between every automatic key rotation (1-365)
86    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
87    pub rotation_interval: Option<String>,
88    /// The rotator type. options: [target/password/api-key/azure-storage-account]
89    #[serde(rename = "rotator-type")]
90    pub rotator_type: String,
91    /// Enable this flag to prevent simultaneous use of the same secret
92    #[serde(rename = "secure-access-disable-concurrent-connections", skip_serializing_if = "Option::is_none")]
93    pub secure_access_disable_concurrent_connections: Option<bool>,
94    /// Enable/Disable secure remote access [true/false]
95    #[serde(rename = "secure-access-enable", skip_serializing_if = "Option::is_none")]
96    pub secure_access_enable: Option<String>,
97    /// Destination URL to inject secrets
98    #[serde(rename = "secure-access-url", skip_serializing_if = "Option::is_none")]
99    pub secure_access_url: Option<String>,
100    /// Enable Web Secure Remote Access
101    #[serde(rename = "secure-access-web", skip_serializing_if = "Option::is_none")]
102    pub secure_access_web: Option<bool>,
103    /// Secure browser via Akeyless's Secure Remote Access (SRA)
104    #[serde(rename = "secure-access-web-browsing", skip_serializing_if = "Option::is_none")]
105    pub secure_access_web_browsing: Option<bool>,
106    /// Web-Proxy via Akeyless's Secure Remote Access (SRA)
107    #[serde(rename = "secure-access-web-proxy", skip_serializing_if = "Option::is_none")]
108    pub secure_access_web_proxy: Option<bool>,
109    /// The name of the storage account key to rotate [key1/key2/kerb1/kerb2] (relevat to azure-storage-account)
110    #[serde(rename = "storage-account-key-name", skip_serializing_if = "Option::is_none")]
111    pub storage_account_key_name: Option<String>,
112    /// Add tags attached to this object
113    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
114    pub tags: Option<Vec<String>>,
115    /// The target name to associate
116    #[serde(rename = "target-name")]
117    pub target_name: String,
118    /// Authentication token (see `/auth` and `/configure`)
119    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
120    pub token: Option<String>,
121    /// The universal identity token, Required only for universal_identity authentication
122    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
123    pub uid_token: Option<String>,
124    /// The user principal name to rotate his password (relevant only for rotator-type=password)
125    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
126    pub username: Option<String>,
127}
128
129impl RotatedSecretCreateAzure {
130    pub fn new(name: String, rotator_type: String, target_name: String) -> RotatedSecretCreateAzure {
131        RotatedSecretCreateAzure {
132            api_id: None,
133            api_key: None,
134            application_id: None,
135            authentication_credentials: None,
136            auto_rotate: None,
137            delete_protection: None,
138            description: None,
139            explicitly_set_sa: None,
140            grace_rotation: None,
141            grace_rotation_hour: None,
142            grace_rotation_interval: None,
143            grace_rotation_timing: None,
144            item_custom_fields: None,
145            json: None,
146            key: None,
147            max_versions: None,
148            name,
149            password_length: None,
150            resource_group_name: None,
151            resource_name: None,
152            rotate_after_disconnect: None,
153            rotation_event_in: None,
154            rotation_hour: None,
155            rotation_interval: None,
156            rotator_type,
157            secure_access_disable_concurrent_connections: None,
158            secure_access_enable: None,
159            secure_access_url: None,
160            secure_access_web: None,
161            secure_access_web_browsing: None,
162            secure_access_web_proxy: None,
163            storage_account_key_name: None,
164            tags: None,
165            target_name,
166            token: None,
167            uid_token: None,
168            username: None,
169        }
170    }
171}
172