Skip to main content

akeyless_api/models/
auth_method_create_universal_identity.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/// AuthMethodCreateUniversalIdentity : authMethodCreateUniversalIdentity is a command that creates a new auth method that will be able to authenticate using Akeyless Universal Identity.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthMethodCreateUniversalIdentity {
17    /// Access expiration date in Unix timestamp (select 0 for access without expiry date)
18    #[serde(rename = "access-expires", skip_serializing_if = "Option::is_none")]
19    pub access_expires: Option<i64>,
20    /// limit the auth method usage for specific client types [cli,ui,gateway-admin,sdk,mobile,extension]
21    #[serde(rename = "allowed-client-type", skip_serializing_if = "Option::is_none")]
22    pub allowed_client_type: Option<Vec<String>>,
23    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
24    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
25    pub audit_logs_claims: Option<Vec<String>>,
26    /// A CIDR whitelist with the IPs that the access is restricted to
27    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
28    pub bound_ips: Option<Vec<String>>,
29    /// Protection from accidental deletion of this object [true/false]
30    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
31    pub delete_protection: Option<String>,
32    /// Deny from root to create children
33    #[serde(rename = "deny-inheritance", skip_serializing_if = "Option::is_none")]
34    pub deny_inheritance: Option<bool>,
35    /// Deny from the token to rotate
36    #[serde(rename = "deny-rotate", skip_serializing_if = "Option::is_none")]
37    pub deny_rotate: Option<bool>,
38    /// Auth Method description
39    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
40    pub description: Option<String>,
41    /// How many days before the expiration of the auth method would you like to be notified.
42    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
43    pub expiration_event_in: Option<Vec<String>>,
44    /// if true: enforce role-association must include sub claims
45    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
46    pub force_sub_claims: Option<bool>,
47    /// A CIDR whitelist with the GW IPs that the access is restricted to
48    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
49    pub gw_bound_ips: Option<Vec<String>>,
50    /// Set output format to JSON
51    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
52    pub json: Option<bool>,
53    /// Jwt TTL
54    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
55    pub jwt_ttl: Option<i64>,
56    /// Auth Method name
57    #[serde(rename = "name")]
58    pub name: String,
59    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
60    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
61    pub product_type: Option<Vec<String>>,
62    /// Authentication token (see `/auth` and `/configure`)
63    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
64    pub token: Option<String>,
65    /// Token ttl
66    #[serde(rename = "ttl", skip_serializing_if = "Option::is_none")]
67    pub ttl: Option<i32>,
68    /// The universal identity token, Required only for universal_identity authentication
69    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
70    pub uid_token: Option<String>,
71}
72
73impl AuthMethodCreateUniversalIdentity {
74    /// authMethodCreateUniversalIdentity is a command that creates a new auth method that will be able to authenticate using Akeyless Universal Identity.
75    pub fn new(name: String) -> AuthMethodCreateUniversalIdentity {
76        AuthMethodCreateUniversalIdentity {
77            access_expires: None,
78            allowed_client_type: None,
79            audit_logs_claims: None,
80            bound_ips: None,
81            delete_protection: None,
82            deny_inheritance: None,
83            deny_rotate: None,
84            description: None,
85            expiration_event_in: None,
86            force_sub_claims: None,
87            gw_bound_ips: None,
88            json: None,
89            jwt_ttl: None,
90            name,
91            product_type: None,
92            token: None,
93            ttl: None,
94            uid_token: None,
95        }
96    }
97}
98