Skip to main content

akeyless_api/models/
auth_method_create_azure_ad.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/// AuthMethodCreateAzureAd : authMethodCreateAzureAD is a command that creates a new auth method that will be able to authenticate using Azure Active Directory credentials.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct AuthMethodCreateAzureAd {
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    /// Deprecated (Deprecated) The audience in the JWT
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 list of group ids that the access is restricted to
30    #[serde(rename = "bound-group-id", skip_serializing_if = "Option::is_none")]
31    pub bound_group_id: Option<Vec<String>>,
32    /// A CIDR whitelist with the IPs that the access is restricted to
33    #[serde(rename = "bound-ips", skip_serializing_if = "Option::is_none")]
34    pub bound_ips: Option<Vec<String>>,
35    /// A list of resource providers that the access is restricted to (e.g, Microsoft.Compute, Microsoft.ManagedIdentity, etc)
36    #[serde(rename = "bound-providers", skip_serializing_if = "Option::is_none")]
37    pub bound_providers: Option<Vec<String>>,
38    /// A list of full resource ids that the access is restricted to
39    #[serde(rename = "bound-resource-id", skip_serializing_if = "Option::is_none")]
40    pub bound_resource_id: Option<Vec<String>>,
41    /// A list of resource names that the access is restricted to (e.g, a virtual machine name, scale set name, etc).
42    #[serde(rename = "bound-resource-names", skip_serializing_if = "Option::is_none")]
43    pub bound_resource_names: Option<Vec<String>>,
44    /// A list of resource types that the access is restricted to (e.g, virtualMachines, userAssignedIdentities, etc)
45    #[serde(rename = "bound-resource-types", skip_serializing_if = "Option::is_none")]
46    pub bound_resource_types: Option<Vec<String>>,
47    /// A list of resource groups that the access is restricted to
48    #[serde(rename = "bound-rg-id", skip_serializing_if = "Option::is_none")]
49    pub bound_rg_id: Option<Vec<String>>,
50    /// A list of service principal IDs that the access is restricted to
51    #[serde(rename = "bound-spid", skip_serializing_if = "Option::is_none")]
52    pub bound_spid: Option<Vec<String>>,
53    /// A list of subscription ids that the access is restricted to
54    #[serde(rename = "bound-sub-id", skip_serializing_if = "Option::is_none")]
55    pub bound_sub_id: Option<Vec<String>>,
56    /// The Azure tenant id that the access is restricted to
57    #[serde(rename = "bound-tenant-id")]
58    pub bound_tenant_id: String,
59    /// Protection from accidental deletion of this object [true/false]
60    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
61    pub delete_protection: Option<String>,
62    /// Auth Method description
63    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
64    pub description: Option<String>,
65    /// How many days before the expiration of the auth method would you like to be notified.
66    #[serde(rename = "expiration-event-in", skip_serializing_if = "Option::is_none")]
67    pub expiration_event_in: Option<Vec<String>>,
68    /// if true: enforce role-association must include sub claims
69    #[serde(rename = "force-sub-claims", skip_serializing_if = "Option::is_none")]
70    pub force_sub_claims: Option<bool>,
71    /// A CIDR whitelist with the GW IPs that the access is restricted to
72    #[serde(rename = "gw-bound-ips", skip_serializing_if = "Option::is_none")]
73    pub gw_bound_ips: Option<Vec<String>>,
74    /// Issuer URL
75    #[serde(rename = "issuer", skip_serializing_if = "Option::is_none")]
76    pub issuer: Option<String>,
77    /// Set output format to JSON
78    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
79    pub json: Option<bool>,
80    /// The URL to the JSON Web Key Set (JWKS) that containing the public keys that should be used to verify any JSON Web Token (JWT) issued by the authorization server.
81    #[serde(rename = "jwks-uri", skip_serializing_if = "Option::is_none")]
82    pub jwks_uri: Option<String>,
83    /// Jwt TTL
84    #[serde(rename = "jwt-ttl", skip_serializing_if = "Option::is_none")]
85    pub jwt_ttl: Option<i64>,
86    /// Auth Method name
87    #[serde(rename = "name")]
88    pub name: String,
89    /// Choose the relevant product type for the auth method [sm, sra, pm, dp, ca]
90    #[serde(rename = "product-type", skip_serializing_if = "Option::is_none")]
91    pub product_type: Option<Vec<String>>,
92    /// Authentication token (see `/auth` and `/configure`)
93    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
94    pub token: Option<String>,
95    /// The universal identity token, Required only for universal_identity authentication
96    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
97    pub uid_token: Option<String>,
98    /// A unique identifier (ID) value which is a \"sub claim\" name that contains details uniquely identifying that resource. This \"sub claim\" is used to distinguish between different identities.
99    #[serde(rename = "unique-identifier", skip_serializing_if = "Option::is_none")]
100    pub unique_identifier: Option<String>,
101}
102
103impl AuthMethodCreateAzureAd {
104    /// authMethodCreateAzureAD is a command that creates a new auth method that will be able to authenticate using Azure Active Directory credentials.
105    pub fn new(bound_tenant_id: String, name: String) -> AuthMethodCreateAzureAd {
106        AuthMethodCreateAzureAd {
107            access_expires: None,
108            allowed_client_type: None,
109            audience: None,
110            audit_logs_claims: None,
111            bound_group_id: None,
112            bound_ips: None,
113            bound_providers: None,
114            bound_resource_id: None,
115            bound_resource_names: None,
116            bound_resource_types: None,
117            bound_rg_id: None,
118            bound_spid: None,
119            bound_sub_id: None,
120            bound_tenant_id,
121            delete_protection: None,
122            description: None,
123            expiration_event_in: None,
124            force_sub_claims: None,
125            gw_bound_ips: None,
126            issuer: None,
127            json: None,
128            jwks_uri: None,
129            jwt_ttl: None,
130            name,
131            product_type: None,
132            token: None,
133            uid_token: None,
134            unique_identifier: None,
135        }
136    }
137}
138