Skip to main content

akeyless_api/models/
create_usc.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/// CreateUsc : CreateUSC is a command that creates a Universal Secrets Connector
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateUsc {
17    /// Azure Key Vault name (Relevant only for Azure targets)
18    #[serde(rename = "azure-kv-name", skip_serializing_if = "Option::is_none")]
19    pub azure_kv_name: Option<String>,
20    /// Protection from accidental deletion of this object [true/false]
21    #[serde(rename = "delete_protection", skip_serializing_if = "Option::is_none")]
22    pub delete_protection: Option<String>,
23    /// Description of the Universal Secrets Connector
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    /// The environments in repo-name/environment-name format, comma-separated (only relevant for: github-scope=repository-environment)
27    #[serde(rename = "environment-names", skip_serializing_if = "Option::is_none")]
28    pub environment_names: Option<String>,
29    /// GCP Project ID (Relevant only for GCP targets)
30    #[serde(rename = "gcp-project-id", skip_serializing_if = "Option::is_none")]
31    pub gcp_project_id: Option<String>,
32    /// GCP Secret Manager regions to query for regional secrets (comma-separated, e.g., us-east1,us-west1). Max 12 regions. Required when listing with object-type=regional-secrets.
33    #[serde(rename = "gcp-sm-regions", skip_serializing_if = "Option::is_none")]
34    pub gcp_sm_regions: Option<String>,
35    /// The scope where secrets will be created, available options: [repository, organization, repository-environment]
36    #[serde(rename = "github-scope", skip_serializing_if = "Option::is_none")]
37    pub github_scope: Option<String>,
38    /// Additional custom fields to associate with the item
39    #[serde(rename = "item-custom-fields", skip_serializing_if = "Option::is_none")]
40    pub item_custom_fields: Option<std::collections::HashMap<String, String>>,
41    /// Set output format to JSON
42    #[serde(rename = "json", skip_serializing_if = "Option::is_none")]
43    pub json: Option<bool>,
44    /// K8s namespace (Relevant to Kubernetes targets)
45    #[serde(rename = "k8s-namespace", skip_serializing_if = "Option::is_none")]
46    pub k8s_namespace: Option<String>,
47    /// Universal Secrets Connector name
48    #[serde(rename = "name")]
49    pub name: String,
50    /// The organization name to create the secret in (only relevant for: github-scope=organization)
51    #[serde(rename = "organization-name", skip_serializing_if = "Option::is_none")]
52    pub organization_name: Option<String>,
53    #[serde(rename = "repository-access", skip_serializing_if = "Option::is_none")]
54    pub repository_access: Option<String>,
55    /// The repository names, comma-separated (only relevant for: github-scope=repository)
56    #[serde(rename = "repository-names", skip_serializing_if = "Option::is_none")]
57    pub repository_names: Option<String>,
58    /// List of the tags attached to this Universal Secrets Connector
59    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
60    pub tags: Option<Vec<String>>,
61    /// Target Universal Secrets Connector to connect
62    #[serde(rename = "target-to-associate")]
63    pub target_to_associate: String,
64    /// Authentication token (see `/auth` and `/configure`)
65    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
66    pub token: Option<String>,
67    /// The universal identity token, Required only for universal_identity authentication
68    #[serde(rename = "uid-token", skip_serializing_if = "Option::is_none")]
69    pub uid_token: Option<String>,
70    /// Prefix for all secrets created in AWS Secrets Manager
71    #[serde(rename = "usc-prefix", skip_serializing_if = "Option::is_none")]
72    pub usc_prefix: Option<String>,
73    /// Whether to filter the USC secret list using the specified usc-prefix [true/false]
74    #[serde(rename = "use-prefix-as-filter", skip_serializing_if = "Option::is_none")]
75    pub use_prefix_as_filter: Option<String>,
76}
77
78impl CreateUsc {
79    /// CreateUSC is a command that creates a Universal Secrets Connector
80    pub fn new(name: String, target_to_associate: String) -> CreateUsc {
81        CreateUsc {
82            azure_kv_name: None,
83            delete_protection: None,
84            description: None,
85            environment_names: None,
86            gcp_project_id: None,
87            gcp_sm_regions: None,
88            github_scope: None,
89            item_custom_fields: None,
90            json: None,
91            k8s_namespace: None,
92            name,
93            organization_name: None,
94            repository_access: None,
95            repository_names: None,
96            tags: None,
97            target_to_associate,
98            token: None,
99            uid_token: None,
100            usc_prefix: None,
101            use_prefix_as_filter: None,
102        }
103    }
104}
105