Skip to main content

akeyless_api/models/
create_native_k8_s_target.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/// CreateNativeK8STarget : createNativeK8STarget is a command that creates a new target. [Deprecated: Use target-create-k8s command]
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateNativeK8STarget {
17    /// Deprecated - use description
18    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
19    pub comment: Option<String>,
20    /// Description of the object
21    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
22    pub description: Option<String>,
23    /// Set output format to JSON
24    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
25    pub json: Option<bool>,
26    /// K8S auth type [token/certificate]
27    #[serde(rename = "k8s-auth-type", skip_serializing_if = "Option::is_none")]
28    pub k8s_auth_type: Option<String>,
29    /// Content of the k8 client certificate (PEM format) in a Base64 format
30    #[serde(rename = "k8s-client-certificate", skip_serializing_if = "Option::is_none")]
31    pub k8s_client_certificate: Option<String>,
32    /// Content of the k8 client private key (PEM format) in a Base64 format
33    #[serde(rename = "k8s-client-key", skip_serializing_if = "Option::is_none")]
34    pub k8s_client_key: Option<String>,
35    /// K8S cluster CA certificate
36    #[serde(rename = "k8s-cluster-ca-cert", skip_serializing_if = "Option::is_none")]
37    pub k8s_cluster_ca_cert: Option<String>,
38    /// K8S cluster URL endpoint
39    #[serde(rename = "k8s-cluster-endpoint", skip_serializing_if = "Option::is_none")]
40    pub k8s_cluster_endpoint: Option<String>,
41    /// K8S cluster name
42    #[serde(rename = "k8s-cluster-name", skip_serializing_if = "Option::is_none")]
43    pub k8s_cluster_name: Option<String>,
44    /// K8S cluster Bearer token
45    #[serde(rename = "k8s-cluster-token", skip_serializing_if = "Option::is_none")]
46    pub k8s_cluster_token: Option<String>,
47    /// The name of a key that used to encrypt the target 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    /// Target name
54    #[serde(rename = "name")]
55    pub name: String,
56    /// Authentication token (see `/auth` and `/configure`)
57    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
58    pub token: Option<String>,
59    /// The universal identity token, Required only for universal_identity authentication
60    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
61    pub uid_token: Option<String>,
62    /// Use the GW's service account
63    #[serde(rename = "use-gw-service-account", skip_serializing_if = "Option::is_none")]
64    pub use_gw_service_account: Option<bool>,
65}
66
67impl CreateNativeK8STarget {
68    /// createNativeK8STarget is a command that creates a new target. [Deprecated: Use target-create-k8s command]
69    pub fn new(name: String) -> CreateNativeK8STarget {
70        CreateNativeK8STarget {
71            comment: None,
72            description: None,
73            json: None,
74            k8s_auth_type: None,
75            k8s_client_certificate: None,
76            k8s_client_key: None,
77            k8s_cluster_ca_cert: None,
78            k8s_cluster_endpoint: None,
79            k8s_cluster_name: None,
80            k8s_cluster_token: None,
81            key: None,
82            max_versions: None,
83            name,
84            token: None,
85            uid_token: None,
86            use_gw_service_account: None,
87        }
88    }
89}
90