Skip to main content

akeyless_api/models/
create_auth_method_k8_s.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/// CreateAuthMethodK8S : createAuthMethodK8S is a command that creates a new auth method that will be able to authenticate using K8S. [Deprecated: Use auth-method-create-k8s command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateAuthMethodK8S {
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    /// The audience in the Kubernetes JWT that the access is restricted to
24    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
25    pub audience: Option<String>,
26    /// Subclaims to include in audit logs, e.g \"--audit-logs-claims email --audit-logs-claims username\"
27    #[serde(rename = "audit-logs-claims", skip_serializing_if = "Option::is_none")]
28    pub audit_logs_claims: Option<Vec<String>>,
29    /// A CIDR whitelist with the IPs that the access is restricted to
30    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
31    pub bound_ips: Option<Vec<String>>,
32    /// A list of namespaces that the access is restricted to
33    #[serde(rename = "bound-namespaces", skip_serializing_if = "Option::is_none")]
34    pub bound_namespaces: Option<Vec<String>>,
35    /// A list of pod names that the access is restricted to
36    #[serde(rename = "bound-pod-names", skip_serializing_if = "Option::is_none")]
37    pub bound_pod_names: Option<Vec<String>>,
38    /// A list of service account names that the access is restricted to
39    #[serde(rename = "bound-sa-names", skip_serializing_if = "Option::is_none")]
40    pub bound_sa_names: Option<Vec<String>>,
41    /// Protection from accidental deletion of this object [true/false]
42    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
43    pub delete_protection: Option<String>,
44    /// Auth Method description
45    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
46    pub description: Option<String>,
47    /// How many days before the expiration of the auth method would you like to be notified.
48    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
49    pub expiration_event_in: Option<Vec<String>>,
50    /// if true: enforce role-association must include sub claims
51    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
52    pub force_sub_claims: Option<bool>,
53    /// Automatically generate key-pair for K8S configuration. If set to false, a public key needs to be provided [true/false]
54    #[serde(rename = "gen-key", skip_serializing_if = "Option::is_none")]
55    pub gen_key: Option<String>,
56    /// A CIDR whitelist with the GW IPs that the access is restricted to
57    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
58    pub gw_bound_ips: Option<Vec<String>>,
59    /// Set output format to JSON
60    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
61    pub json: Option<bool>,
62    /// Jwt TTL
63    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
64    pub jwt_ttl: Option<i64>,
65    /// Auth Method name
66    #[serde(rename = "name")]
67    pub name: String,
68    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
69    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
70    pub product_type: Option<Vec<String>>,
71    /// Base64-encoded or PEM formatted public key data for K8S authentication method is required [RSA2048]
72    #[serde(rename = "public-key", skip_serializing_if = "Option::is_none")]
73    pub public_key: Option<String>,
74    /// Authentication token (see `/auth` and `/configure`)
75    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
76    pub token: Option<String>,
77    /// The universal identity token, Required only for universal_identity authentication
78    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
79    pub uid_token: Option<String>,
80}
81
82impl CreateAuthMethodK8S {
83    /// createAuthMethodK8S is a command that creates a new auth method that will be able to authenticate using K8S. [Deprecated: Use auth-method-create-k8s command]
84    pub fn new(name: String) -> CreateAuthMethodK8S {
85        CreateAuthMethodK8S {
86            access_expires: None,
87            allowed_client_type: None,
88            audience: None,
89            audit_logs_claims: None,
90            bound_ips: None,
91            bound_namespaces: None,
92            bound_pod_names: None,
93            bound_sa_names: None,
94            delete_protection: None,
95            description: None,
96            expiration_event_in: None,
97            force_sub_claims: None,
98            gen_key: None,
99            gw_bound_ips: None,
100            json: None,
101            jwt_ttl: None,
102            name,
103            product_type: None,
104            public_key: None,
105            token: None,
106            uid_token: None,
107        }
108    }
109}
110