Skip to main content

akeyless_api/models/
rotated_secret_create_aws.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 RotatedSecretCreateAws {
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    /// The credentials to connect with use-user-creds/use-target-creds
23    #[serde(rename = "authentication-credentials", skip_serializing_if = "Option::is_none")]
24    pub authentication_credentials: Option<String>,
25    /// Whether to automatically rotate every --rotation-interval days, or disable existing automatic rotation [true/false]
26    #[serde(rename = "auto-rotate", skip_serializing_if = "Option::is_none")]
27    pub auto_rotate: Option<String>,
28    /// Aws Region
29    #[serde(rename = "aws-region", skip_serializing_if = "Option::is_none")]
30    pub aws_region: 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    /// 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]
38    #[serde(rename = "grace-rotation", skip_serializing_if = "Option::is_none")]
39    pub grace_rotation: Option<String>,
40    /// The Hour of the grace rotation in UTC
41    #[serde(rename = "grace-rotation-hour", skip_serializing_if = "Option::is_none")]
42    pub grace_rotation_hour: Option<i32>,
43    /// The number of days to wait before deleting the old key (must be bigger than rotation-interval)
44    #[serde(rename = "grace-rotation-interval", skip_serializing_if = "Option::is_none")]
45    pub grace_rotation_interval: Option<String>,
46    /// When to create the new version relative to the rotation date [after/before]
47    #[serde(rename = "grace-rotation-timing", skip_serializing_if = "Option::is_none")]
48    pub grace_rotation_timing: Option<String>,
49    /// Additional custom fields to associate with the item
50    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
51    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
52    /// Set output format to JSON
53    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
54    pub json: Option<bool>,
55    /// The name of a key that used to encrypt the secret value (if empty, the account default protectionKey key will be used)
56    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
57    pub key: Option<String>,
58    /// Set the maximum number of versions, limited by the account settings defaults.
59    #[serde(rename = "max-versions", skip_serializing_if = "Option::is_none")]
60    pub max_versions: Option<String>,
61    /// Rotated secret name
62    #[serde(rename = "name")]
63    pub name: String,
64    /// The length of the password to be generated
65    #[serde(rename = "password-length", skip_serializing_if = "Option::is_none")]
66    pub password_length: Option<String>,
67    /// Rotate the value of the secret after SRA session ends [true/false]
68    #[serde(rename = "rotate-after-disconnect", skip_serializing_if = "Option::is_none")]
69    pub rotate_after_disconnect: Option<String>,
70    /// How many days before the rotation of the item would you like to be notified
71    #[serde(rename = "rotation-event-in", skip_serializing_if = "Option::is_none")]
72    pub rotation_event_in: Option<Vec<String>>,
73    /// The Hour of the rotation in UTC
74    #[serde(rename = "rotation-hour", skip_serializing_if = "Option::is_none")]
75    pub rotation_hour: Option<i32>,
76    /// The number of days to wait between every automatic key rotation (1-365)
77    #[serde(rename = "rotation-interval", skip_serializing_if = "Option::is_none")]
78    pub rotation_interval: Option<String>,
79    /// The rotator type. options: [target/api-key]
80    #[serde(rename = "rotator-type")]
81    pub rotator_type: String,
82    /// The AWS account id
83    #[serde(rename = "secure-access-aws-account-id", skip_serializing_if = "Option::is_none")]
84    pub secure_access_aws_account_id: Option<String>,
85    /// The AWS native cli
86    #[serde(rename = "secure-access-aws-native-cli", skip_serializing_if = "Option::is_none")]
87    pub secure_access_aws_native_cli: Option<bool>,
88    /// Deprecated. use secure-access-certificate-issuer
89    #[serde(rename = "secure-access-bastion-issuer", skip_serializing_if = "Option::is_none")]
90    pub secure_access_bastion_issuer: Option<String>,
91    /// Path to the SSH Certificate Issuer for your Akeyless Secure Access
92    #[serde(rename = "secure-access-certificate-issuer", skip_serializing_if = "Option::is_none")]
93    pub secure_access_certificate_issuer: Option<String>,
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    /// Add tags attached to this object
98    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
99    pub tags: Option<Vec<String>>,
100    /// The target name to associate
101    #[serde(rename = "target-name")]
102    pub target_name: String,
103    /// Authentication token (see `/auth` and `/configure`)
104    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
105    pub token: Option<String>,
106    /// The universal identity token, Required only for universal_identity authentication
107    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
108    pub uid_token: Option<String>,
109}
110
111impl RotatedSecretCreateAws {
112    pub fn new(name: String, rotator_type: String, target_name: String) -> RotatedSecretCreateAws {
113        RotatedSecretCreateAws {
114            api_id: None,
115            api_key: None,
116            authentication_credentials: None,
117            auto_rotate: None,
118            aws_region: None,
119            delete_protection: None,
120            description: None,
121            grace_rotation: None,
122            grace_rotation_hour: None,
123            grace_rotation_interval: None,
124            grace_rotation_timing: None,
125            item_custom_fields: None,
126            json: None,
127            key: None,
128            max_versions: None,
129            name,
130            password_length: None,
131            rotate_after_disconnect: None,
132            rotation_event_in: None,
133            rotation_hour: None,
134            rotation_interval: None,
135            rotator_type,
136            secure_access_aws_account_id: None,
137            secure_access_aws_native_cli: None,
138            secure_access_bastion_issuer: None,
139            secure_access_certificate_issuer: None,
140            secure_access_enable: None,
141            tags: None,
142            target_name,
143            token: None,
144            uid_token: None,
145        }
146    }
147}
148