### Example SSH Search Queries Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/types/ssh.rs.html?search= Illustrates example search queries for SSH-related information. ```rust * std::vec * u32 -> bool * Option, (T -> U) -> Option ``` -------------------------------- ### Autopilot Server State Search Examples Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/sys/struct.AutopilotServerState.html?search= Examples of how to perform searches on Autopilot Server State. ```APIDOC ## Search Autopilot Server State ### Description Provides examples of search queries for Autopilot Server State. ### Example Searches * `std::vec` * `u32 -> bool` * `Option, (T -> U) -> Option` ``` -------------------------------- ### MountPath Search Examples Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/secret/struct.MountPath.html?search= Demonstrates example searches for secret mount paths. These examples illustrate common search patterns and type conversions. ```APIDOC ## Example Searches ### Basic Search ``` std::vec ``` ### Type Conversion Search ``` u32 -> bool ``` ### Generic Type Conversion Search ``` Option, (T -> U) -> Option ``` ``` -------------------------------- ### AzureAuthRoleInfo Search Examples Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/azure/struct.AzureAuthRoleInfo.html?search= Provides examples of how to search for AzureAuthRoleInfo. ```APIDOC ## AzureAuthRoleInfo Search ### Description This section provides example searches for AzureAuthRoleInfo. ### Example Searches * `std::vec` * `u32 -> bool` * `Option, (T -> U) -> Option` ``` -------------------------------- ### Example Search: Option mapping Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/secret/type.SecretString.html?search=std%3A%3Avec Shows a search pattern for mapping operations on Option types. ```rust Option, (T -> U) -> Option ``` -------------------------------- ### Example Search: u32 to bool conversion Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/secret/type.SecretString.html?search=std%3A%3Avec Illustrates a search query for type conversions from u32 to bool. ```rust u32 -> bool ``` -------------------------------- ### List Plugins Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html Lists all plugins of a given type installed in Vault. ```APIDOC ## GET /sys/plugins/{plugin_type} ### Description Lists all plugins of a given type (e.g., "secret", "auth") installed in Vault. ### Method GET ### Endpoint /sys/plugins/{plugin_type} ### Parameters #### Path Parameters - **plugin_type** (string) - Required - The type of plugins to list (e.g., "secret", "auth", "audit"). ### Response #### Success Response (200) - **plugins** (array of strings) - A list of plugin names. #### Response Example ```json { "plugins": [ "my-custom-secret-engine", "aws" ] } ``` ``` -------------------------------- ### Rekey Initialization Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Initializes the rekey process. This requires providing the necessary parameters to start the rekey operation. ```APIDOC ## PUT sys/rekey/init ### Description Initializes the rekey process. ### Method PUT ### Endpoint sys/rekey/init ### Parameters #### Request Body - **params** (RekeyInitRequest) - Required - Parameters for rekey initialization. ``` -------------------------------- ### Example Search: std::vec Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/secret/type.SecretString.html?search=std%3A%3Avec Demonstrates a common search pattern for the standard library's vector type. ```rust std::vec ``` -------------------------------- ### Get Version History Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Retrieves the version history of the Vault installation, sorted by installation timestamp. ```rust pub async fn version_history(&self) -> Result, VaultError> { let resp: VersionHistoryResponse = self .client .exec_with_data(Method::GET, "sys/version-history", None) .await?; let mut entries: Vec = resp .key_info .into_iter() .map(|(ver, mut entry)| { entry.version = ver; entry }) .collect(); entries.sort_by(|a, b| a.timestamp_installed.cmp(&b.timestamp_installed)); Ok(entries) } ``` -------------------------------- ### Init Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/seal.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes the Vault server with provided parameters. ```APIDOC ## PUT sys/init ### Description Initializes the Vault server with provided parameters. ### Method PUT ### Endpoint sys/init ### Parameters #### Request Body - **params** (InitParams) - Required - The initialization parameters. ### Response #### Success Response (200) - **InitResponse** (InitResponse) - The response containing initialization details. ``` -------------------------------- ### Get Raft Configuration Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/raft.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Retrieves the current Raft storage configuration. This is useful for understanding the Raft cluster's setup and operational parameters. ```APIDOC ## GET /sys/storage/raft/configuration ### Description Retrieves the current Raft storage configuration. ### Method GET ### Endpoint /sys/storage/raft/configuration ### Response #### Success Response (200) - **RaftConfig** (object) - The Raft configuration details. ``` -------------------------------- ### Rekey Init Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/mod.rs.html?search=std%3A%3Avec Initializes the rekey process. ```APIDOC ## POST /sys/rekey/init ### Description Initializes the rekey process. ### Method POST ### Endpoint /sys/rekey/init ### Request Body - **params** (RekeyInitRequest) - Required - The parameters for initializing the rekey process. ``` -------------------------------- ### Enable Auth Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Enable an auth mount. ```APIDOC ## POST /sys/auth/:path ### Description Enable an auth mount. ### Method POST ### Endpoint /sys/auth/:path ### Parameters #### Path Parameters - **path** (string) - Required - The path for the auth mount. #### Request Body - **params** (AuthMountParams) - Required - The parameters for the auth mount. ``` -------------------------------- ### rekey_init Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes the rekeying process with the provided parameters. ```APIDOC ## rekey_init ### Description Initializes the rekeying process with the provided parameters. ### Method N/A (Asynchronous function call) ### Parameters #### Request Body - **params** (RekeyInitRequest) - Required - The parameters for rekey initialization. ### Request Example ```json { "key": "your_master_key", "nonce": "some_nonce" } ``` ### Response #### Success Response - **RekeyStatus** - The current status of the rekeying process. #### Response Example ```json { "progress": 0, "initialized": true } ``` ``` -------------------------------- ### Get Key Status Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/wrapping.rs.html Retrieves the status of the encryption keys used by Vault. This is a simple GET request to the 'sys/key-status' endpoint. ```rust pub async fn key_status(&self) -> Result { self.client .exec_with_data(Method::GET, "sys/key-status", None) .await } ``` -------------------------------- ### Generate Root Init Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/mod.rs.html?search=std%3A%3Avec Initializes the generate root process. ```APIDOC ## POST /sys/generate-root/init ### Description Initializes the generate root process. ### Method POST ### Endpoint /sys/generate-root/init ### Request Body - **params** (GenerateRootInitRequest) - Required - The parameters for initializing the generate root process. ``` -------------------------------- ### Get Terraform Cloud Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/terraform.rs.html?search=u32+-%3E+bool Retrieves credentials for a given Terraform Cloud role. This method sends a GET request to the /creds/{role} endpoint. ```APIDOC ## GET /creds/{role} ### Description Retrieves credentials for a given Terraform Cloud role. ### Method GET ### Endpoint /creds/{role} ### Parameters #### Path Parameters - **role** (string) - Required - The name of the role for which to retrieve credentials. ### Response #### Success Response (200) - **TerraformCloudToken** - The retrieved credentials. ``` -------------------------------- ### Async Vault Client Usage Example Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/lib.rs.html Demonstrates how to initialize an asynchronous Vault client and perform basic operations like reading KV v2 secrets and checking system health. Requires the `VaultClient` and `Kv2Operations` traits. ```rust use vault_client_rs::{VaultClient, Kv2Operations}; # async fn example() -> Result<(), vault_client_rs::VaultError> { let client = VaultClient::new("https://vault.example.com:8200", "hvs.EXAMPLE")?; // KV v2: read secret data directly let secret: std::collections::HashMap = client.kv2("secret").read_data("my/path").await?; // Sys let health = client.sys().health().await?; # Ok(()) # } ``` -------------------------------- ### configure Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.KerberosAuthOperations.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Configures Kerberos authentication settings. Requires Kerberos configuration parameters. ```APIDOC ## configure ### Description Configures the Kerberos authentication settings for the Vault client. ### Method (Not specified, likely an SDK method call) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body * **config** (KerberosConfigRequest) - Required - The Kerberos configuration details. ### Request Example (Not specified in source) ### Response #### Success Response (200) Indicates successful configuration. #### Response Example (Not specified in source) ``` -------------------------------- ### Get GCP OAuth Token Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/gcp.rs.html Retrieves an OAuth token for a given roleset. This operation uses a GET request and requires the roleset name as a path parameter. ```APIDOC ## GET /token/{roleset} ### Description Gets an OAuth token for a given roleset. ### Method GET ### Endpoint /token/{roleset} ### Parameters #### Path Parameters - **roleset** (string) - Required - The name of the roleset for which to retrieve the OAuth token. ### Response #### Success Response (200) - **GcpOAuthToken** (GcpOAuthToken) - The OAuth token details. ``` -------------------------------- ### Init Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/seal.rs.html?search= Initializes a new Vault server. This is typically done only once when setting up a new Vault cluster. ```APIDOC ## PUT sys/init ### Description Initializes a new Vault server. This operation should only be performed on a fresh Vault installation. ### Method PUT ### Endpoint sys/init ### Parameters #### Request Body - **params** (object) - Required - Initialization parameters, including secret shares and threshold. ``` -------------------------------- ### Get GCP Service Account Key Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/gcp.rs.html Retrieves a service account key for a given roleset. This operation uses a GET request and requires the roleset name as a path parameter. ```APIDOC ## GET /key/{roleset} ### Description Gets a service account key for a given roleset. ### Method GET ### Endpoint /key/{roleset} ### Parameters #### Path Parameters - **roleset** (string) - Required - The name of the roleset for which to retrieve the key. ### Response #### Success Response (200) - **GcpServiceAccountKey** (GcpServiceAccountKey) - The service account key details. ``` -------------------------------- ### Get Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html?search=u32+-%3E+bool Retrieves AWS credentials for a given role. ```APIDOC ## GET /aws/creds/{name} ### Description Retrieves AWS credentials for a given role. ### Method GET ### Endpoint /aws/creds/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve credentials. ### Response #### Success Response (200) - **AwsCredentials** - The retrieved AWS credentials. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### ClientBuilder from_env Method Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search= Initializes the `ClientBuilder` by reading configuration from environment variables like `VAULT_TOKEN` and `VAULT_SKIP_VERIFY`. ```rust impl ClientBuilder { /// Pre-populate the builder from `VAULT_*` environment variables; /// token resolution order: `VAULT_TOKEN` → `~/.vault-token` → `None` pub fn from_env() -> Self { let cli_mode = std::env::var("VAULT_CLI_MODE") .ok() .is_some_and(|v| v == "1" || v.eq_ignore_ascii_case("true")); let skip_tls = std::env::var("VAULT_SKIP_VERIFY") .ok() .or_else(|| { let v = std::env::var("VAULT_SKIP_TLS_VERIFY").ok(); if v.is_some() { tracing::warn!("VAULT_SKIP_TLS_VERIFY is non-standard; use VAULT_SKIP_VERIFY"); } v }) .is_some_and(|v| v == "1" || v.eq_ignore_ascii_case("true")); Self { ``` -------------------------------- ### Get Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Retrieves AWS credentials for a given role. ```APIDOC ## GET /aws/creds/{name} ### Description Retrieves AWS credentials for a given role. ### Method GET ### Endpoint /aws/creds/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve credentials. ### Response #### Success Response (200) - **AwsCredentials** - The retrieved AWS credentials. #### Response Example ```json { "example": "response body for AwsCredentials" } ``` ``` -------------------------------- ### VaultClient Initialization and KV v2 Read Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/lib.rs.html?search= Demonstrates how to create a VaultClient instance and perform a read operation on a KV v2 secret. ```APIDOC ## VaultClient::new and Kv2Handler::read_data ### Description Initializes a new `VaultClient` and demonstrates reading data from a KV v2 secret. ### Method `VaultClient::new` (constructor), `Kv2Handler::read_data` (async method) ### Endpoint N/A (Client-side SDK method) ### Parameters #### `VaultClient::new` parameters: - **address** (str) - Required - The base URL of the Vault server. - **token** (str) - Required - The authentication token for Vault. #### `Kv2Handler::read_data` parameters: - **mount_path** (str) - Required - The mount path of the KV v2 engine (e.g., "secret"). - **path** (str) - Required - The path to the secret within the engine. ### Request Example ```rust let client = VaultClient::new("https://vault.example.com:8200", "hvs.EXAMPLE")?; let secret: std::collections::HashMap = client.kv2("secret").read_data("my/path").await?; ``` ### Response #### Success Response (`Kv2Handler::read_data`) - Returns a HashMap containing the secret data. #### Response Example (`Kv2Handler::read_data`) ```json { "my/path": { "key1": "value1", "key2": "value2" } } ``` ``` -------------------------------- ### Get Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html Retrieves AWS credentials for a given role. ```APIDOC ## GET /creds/{name} ### Description Retrieves AWS credentials for a given role. ### Method GET ### Endpoint /creds/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve credentials. ### Response #### Success Response (200) - **AwsCredentials** (AwsCredentials) - The retrieved AWS credentials. ``` -------------------------------- ### Initialize ClientBuilder from Environment Variables Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/client/struct.ClientBuilder.html Pre-populates the builder using VAULT_* environment variables. Token resolution follows a specific order: VAULT_TOKEN, then ~/.vault-token, and finally None. ```rust pub fn from_env() -> Self ``` -------------------------------- ### Example Searches Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/aws/struct.AwsAuthRoleRequest.html?search= Common search patterns that can be used within the library. ```text std::vec ``` ```text u32 -> bool ``` ```text Option, (T -> U) -> Option ``` -------------------------------- ### Create Vault Client from Environment Variables Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search= Initializes a `VaultClient` by reading configuration from standard `VAULT_*` environment variables. It supports token resolution from `VAULT_TOKEN`, `~/.vault-token`, or defaults to `None` if no token is found. ```rust pub fn from_env() -> Result { ClientBuilder::from_env().build() } ``` -------------------------------- ### Any Trait Implementation Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/totp/struct.TotpKeyRequest.html?search=std%3A%3Avec Provides a way to get the TypeId of a TotpKeyRequest instance. ```rust impl Any for T where T: 'static + ?Sized { fn type_id(&self) -> TypeId; } ``` -------------------------------- ### Mount Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Configures a new mount. ```APIDOC ## POST /sys/mounts/:path ### Description Configures a new mount. ### Method POST ### Endpoint /sys/mounts/:path ### Parameters #### Path Parameters - **path** (string) - Required - The path for the mount. #### Request Body - **params** (MountParams) - Required - The parameters for the mount. ``` -------------------------------- ### Get Database Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/database.rs.html?search=std%3A%3Avec Retrieves database credentials for a given role. ```APIDOC ## GET /:mount/creds/:role ### Description Retrieves database credentials for a given role. ### Method GET ### Endpoint /:mount/creds/:role ### Parameters #### Path Parameters - **role** (string) - Required - The name of the role for which to retrieve credentials. ### Response #### Success Response (200) - **DatabaseCredentials** (DatabaseCredentials) - The database credentials. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### Get Consul Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/consul.rs.html?search= Generates Consul credentials for a given role. ```APIDOC ## GET /v1/{mount}/creds/{role} ### Description Generates Consul credentials for a given role. ### Method GET ### Endpoint /v1/{mount}/creds/{role} ### Parameters #### Path Parameters - **role** (string) - Required - The name of the role for which to generate credentials. ### Response #### Success Response (200) - **ConsulCredentials** (ConsulCredentials) - The generated Consul credentials. #### Response Example ```json { "example": "ConsulCredentials object" } ``` ``` -------------------------------- ### Get STS Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html?search=u32+-%3E+bool Retrieves STS credentials for a given role. ```APIDOC ## POST /aws/sts/{name} ### Description Retrieves STS credentials for a given role. ### Method POST ### Endpoint /aws/sts/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve STS credentials. #### Request Body - **params** (AwsStsRequest) - Required - The parameters for requesting STS credentials. ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **AwsCredentials** - The retrieved STS credentials. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### configure Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.KerberosAuthOperations.html Configures Kerberos authentication settings. Requires a KerberosConfigRequest object. ```APIDOC ## configure ### Description Configures Kerberos authentication settings. Requires a KerberosConfigRequest object. ### Method Not applicable (Rust trait method) ### Endpoint Not applicable (Rust trait method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (KerberosConfigRequest) - The configuration object for Kerberos. ### Request Example ```rust // let config = KerberosConfigRequest { ... }; // kerberos_auth_handler.configure(&config).await.unwrap(); ``` ### Response #### Success Response - **()** - Indicates successful configuration. #### Response Example ```json // No response body on success ``` -------------------------------- ### Get STS Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Retrieves STS credentials for a given role. ```APIDOC ## POST /aws/sts/{name} ### Description Retrieves STS credentials for a given role. ### Method POST ### Endpoint /aws/sts/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve STS credentials. #### Request Body - **params** (AwsStsRequest) - Required - The parameters for requesting STS credentials. ### Request Example ```json { "example": "request body for AwsStsRequest" } ``` ### Response #### Success Response (200) - **AwsCredentials** - The retrieved STS credentials. #### Response Example ```json { "example": "response body for AwsCredentials" } ``` ``` -------------------------------- ### ClientBuilder::from_env Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search=std%3A%3Avec Initializes the `ClientBuilder` by attempting to load configuration from environment variables, including `VAULT_ADDR`, `VAULT_TOKEN`, and TLS settings. ```APIDOC ## ClientBuilder::from_env() ### Description Pre-populates the builder from `VAULT_*` environment variables. Token resolution order: `VAULT_TOKEN` → `~/.vault-token` → `None`. ### Returns A `ClientBuilder` instance configured with environment variables. ``` -------------------------------- ### Get STS Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/aws.rs.html Retrieves STS credentials for a given role. ```APIDOC ## POST /sts/{name} ### Description Retrieves STS credentials for a given role. ### Method POST ### Endpoint /sts/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the role for which to retrieve STS credentials. #### Request Body - **params** (AwsStsRequest) - Required - The parameters for requesting STS credentials. ``` -------------------------------- ### Get MountPath as String Slice Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/secret/struct.MountPath.html?search= Returns a string slice representation of the MountPath. ```rust pub fn as_str(&self) -> &str ``` -------------------------------- ### Create Namespace Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/mod.rs.html?search=std%3A%3Avec Creates a new namespace. ```APIDOC ## POST /sys/namespaces/{path} ### Description Creates a new namespace. ### Method POST ### Endpoint /sys/namespaces/{path} ### Parameters #### Path Parameters - **path** (string) - Required - The path for the new namespace. ``` -------------------------------- ### Get AWS Credentials Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.AwsSecretsOperations.html Retrieves AWS credentials for a specified role name. ```rust fn get_credentials( &self, name: &str, ) -> impl Future> + Send; ``` -------------------------------- ### Rekey Initialization Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes the rekey process by providing the necessary parameters. This is the first step in rotating the master key. ```APIDOC ## PUT /sys/rekey/init ### Description Initializes the rekey process. Requires a `RekeyInitRequest` object containing the configuration for the rekey operation. ### Method PUT ### Endpoint /sys/rekey/init ### Parameters #### Request Body - **RekeyInitRequest** (object) - Required - Contains parameters for rekey initialization. - **pgp_keys** (array[string]) - Optional - PGP keys to encrypt the rekey shares. - **barrier** (object) - Optional - Configuration for the auto-unseal barrier. - **type** (string) - Required - Type of the auto-unseal barrier. - **config** (object) - Required - Configuration specific to the barrier type. ### Response #### Success Response (200) - **RekeyStatus** (object) - The status of the rekey operation. - **progress** (integer) - The current progress of the rekey operation. - **num_shares** (integer) - The total number of shares required. - **num_threshold** (integer) - The number of shares required to reconstruct the key. - **tink_wrapped_key** (string) - The Tink-wrapped rekey key, if applicable. - **encoded_shares** (object) - Encoded rekey shares, if applicable. ### Request Example ```json { "pgp_keys": ["-----BEGIN PGP PUBLIC KEY-----\n...\n-----END PGP PUBLIC KEY-----"], "barrier": { "type": "kms", "config": { "cloud_kms_key_id": "projects/my-project/locations/us-central1/keyRings/my-keyring/cryptoKeys/my-key" } } } ``` ### Response Example ```json { "progress": 1, "num_shares": 5, "num_threshold": 3, "tink_wrapped_key": null, "encoded_shares": { "share1": "...", "share2": "..." } } ``` ``` -------------------------------- ### Get Host Information Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Retrieves information about the host system where Vault is running. ```rust pub async fn host_info(&self) -> Result { self.client .exec_with_data(Method::GET, "sys/host-info", None) .await } ``` -------------------------------- ### Initialize Vault Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Initializes a new Vault server. ```APIDOC ## init ### Description Initializes a new Vault server. ### Method Future returning `Result` ### Parameters - **params** (`&InitParams`): Parameters for initialization. ### Response #### Success Response - **InitResponse**: Contains the response after initialization. ``` -------------------------------- ### Get Metrics JSON Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Fetches the Vault server metrics in JSON format. ```rust pub async fn metrics_json(&self) -> Result { self.client .exec_direct(Method::GET, "sys/metrics", None) .await } ``` -------------------------------- ### configure Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.GithubAuthOperations.html?search=u32+-%3E+bool Configures GitHub settings. Returns an empty result upon success or a VaultError on failure. ```APIDOC ## configure ### Description Configures GitHub settings. Returns an empty result upon success or a VaultError on failure. ### Method (Not specified, likely part of an SDK) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (GithubConfigRequest) - The GitHub configuration to apply. ### Request Example None ### Response #### Success Response (200) Empty result. #### Response Example None ERROR HANDLING: - **VaultError** (type) - Error type if configuration fails. ``` -------------------------------- ### Version History Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html?search=u32+-%3E+bool Retrieves the version history of Vault, including installation timestamps and versions. ```APIDOC ## GET sys/version-history ### Description Retrieves the version history of Vault, including installation timestamps and versions. ### Method GET ### Endpoint sys/version-history ### Response #### Success Response (200) - **versions** (array) - A list of version history entries. - **VersionHistoryEntry** (object) - Details of a specific version. - **version** (string) - The Vault version. - **timestamp_installed** (string) - The timestamp when the version was installed. - **seal_type** (string) - The seal type used for this version. ``` -------------------------------- ### Create VaultClient from Environment Variables Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html Initializes a VaultClient by reading configuration from standard VAULT_* environment variables. It supports token resolution from VAULT_TOKEN, ~/.vault-token, or defaults to None. ```rust pub fn from_env() -> Result { ClientBuilder::from_env().build() } ``` -------------------------------- ### Rewrap Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search=std%3A%3Avec Rewraps a token to get a new token with potentially different lease duration. ```APIDOC ## POST /sys/wrapping/rewrap ### Description Rewraps a token to get a new token with potentially different lease duration. ### Method POST ### Endpoint /sys/wrapping/rewrap ### Parameters #### Request Body - **token** (SecretString) - Required - The token to rewrap. ``` -------------------------------- ### Any Trait Implementation Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/identity/struct.IdentityHandler.html?search=u32+-%3E+bool Implements the Any trait for any type T, providing a method to get the TypeId of the instance. ```rust impl Any for T where T: 'static + ?Sized, Source #### fn type_id(&self) -> TypeId Gets the `TypeId` of `self`. Read more Source ``` -------------------------------- ### Initialize AuthHandler Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/auth/mod.rs.html?search=u32+-%3E+bool Provides access to various authentication methods like token, approle, kubernetes, userpass, ldap, cert, github, oidc, aws, azure, gcp, and radius. ```rust pub struct AuthHandler<'a> { pub(crate) client: &'a VaultClient, } impl<'a> AuthHandler<'a> { #[must_use] pub fn token(&self) -> token::TokenAuthHandler<'a> { token::TokenAuthHandler { client: self.client, } } #[must_use] pub fn approle(&self) -> approle::AppRoleAuthHandler<'a> { self.approle_at("approle") } #[must_use] pub fn approle_at(&self, mount: &str) -> approle::AppRoleAuthHandler<'a> { approle::AppRoleAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn kubernetes(&self) -> kubernetes::K8sAuthHandler<'a> { self.kubernetes_at("kubernetes") } #[must_use] pub fn kubernetes_at(&self, mount: &str) -> kubernetes::K8sAuthHandler<'a> { kubernetes::K8sAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn userpass(&self) -> userpass::UserpassAuthHandler<'a> { self.userpass_at("userpass") } #[must_use] pub fn userpass_at(&self, mount: &str) -> userpass::UserpassAuthHandler<'a> { userpass::UserpassAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn ldap(&self) -> ldap::LdapAuthHandler<'a> { self.ldap_at("ldap") } #[must_use] pub fn ldap_at(&self, mount: &str) -> ldap::LdapAuthHandler<'a> { ldap::LdapAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn cert(&self) -> cert::CertAuthHandler<'a> { self.cert_at("cert") } #[must_use] pub fn cert_at(&self, mount: &str) -> cert::CertAuthHandler<'a> { cert::CertAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn github(&self) -> github::GithubAuthHandler<'a> { self.github_at("github") } #[must_use] pub fn github_at(&self, mount: &str) -> github::GithubAuthHandler<'a> { github::GithubAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn oidc(&self) -> oidc::OidcAuthHandler<'a> { self.oidc_at("oidc") } #[must_use] pub fn oidc_at(&self, mount: &str) -> oidc::OidcAuthHandler<'a> { oidc::OidcAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn jwt(&self) -> oidc::OidcAuthHandler<'a> { self.oidc_at("jwt") } #[must_use] pub fn jwt_at(&self, mount: &str) -> oidc::OidcAuthHandler<'a> { self.oidc_at(mount) } #[must_use] pub fn aws(&self) -> aws::AwsAuthHandler<'a> { self.aws_at("aws") } #[must_use] pub fn aws_at(&self, mount: &str) -> aws::AwsAuthHandler<'a> { aws::AwsAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn azure(&self) -> azure::AzureAuthHandler<'a> { self.azure_at("azure") } #[must_use] pub fn azure_at(&self, mount: &str) -> azure::AzureAuthHandler<'a> { azure::AzureAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn gcp(&self) -> gcp::GcpAuthHandler<'a> { self.gcp_at("gcp") } #[must_use] pub fn gcp_at(&self, mount: &str) -> gcp::GcpAuthHandler<'a> { gcp::GcpAuthHandler { client: self.client, mount: encode_path(mount), } } #[must_use] pub fn radius(&self) -> radius::RadiusAuthHandler<'a> { ``` -------------------------------- ### Get In-Flight Requests Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Retrieves a map of in-flight requests currently being processed by Vault. ```rust pub async fn in_flight_requests(&self) -> Result, VaultError> { self.client .exec_direct(Method::GET, "sys/in-flight-req", None) .await } ``` -------------------------------- ### Create Client with Namespace Override Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Return a new client view with a different namespace. This is a cheap operation as it clones an Arc pointer. ```rust pub fn with_namespace(&self, ns: &str) -> Self { VaultClient { inner: Arc::clone(&self.inner), namespace_override: Some(ns.to_owned()), wrap_ttl_override: self.wrap_ttl_override.clone(), } } ``` -------------------------------- ### VaultClient::new Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search= Initializes a new VaultClient with a given address and a plaintext token. This is a convenient constructor for basic client setup. For more advanced configuration options, consider using `VaultClient::builder()`. ```APIDOC ## VaultClient::new ### Description Creates a new VaultClient instance configured with the provided Vault server address and a plaintext authentication token. This method offers a straightforward way to get started with the client. ### Method `pub fn new(address: &str, token: &str) -> Result` ### Parameters - **address** (`&str`): The base URL of the Vault server. - **token** (`&str`): The authentication token to use for API requests. ### Returns - `Result`: Returns a `VaultClient` instance on success, or a `VaultError` if configuration or initialization fails. ``` -------------------------------- ### Get Generate Root Status Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Retrieves the current status of the generate root process. ```rust pub async fn generate_root_status(&self) -> Result { self.client .exec_direct(Method::GET, "sys/generate-root/attempt", None) .await } ``` -------------------------------- ### Get Rekey Status Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Retrieves the current status of the rekey process from the Vault API. ```rust pub async fn rekey_status(&self) -> Result { self.client .exec_direct(Method::GET, "sys/rekey/init", None) .await } ``` -------------------------------- ### Create Namespace Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Creates a new namespace with the specified path. Requires the desired path for the new namespace. ```rust pub async fn create_namespace( &self, path: &str, ) -> Result ``` -------------------------------- ### Get Static Database Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/database.rs.html?search=std%3A%3Avec Retrieves static database credentials for a given role. ```APIDOC ## GET /:mount/static-creds/:name ### Description Retrieves static database credentials for a given role. ### Method GET ### Endpoint /:mount/static-creds/:name ### Parameters #### Path Parameters - **name** (string) - Required - The name of the static role for which to retrieve credentials. ### Response #### Success Response (200) - **DatabaseStaticCredentials** (DatabaseStaticCredentials) - The static database credentials. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### configure Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.GcpAuthOperations.html?search=u32+-%3E+bool Configures GCP authentication settings. Returns an empty result on success or an error. ```APIDOC ## configure ### Description Configures GCP authentication settings. Returns an empty result on success or an error. ### Method (async fn) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (&GcpAuthConfigRequest) - Required - The GCP authentication configuration request. ### Response #### Success Response (200) - **()** - Indicates successful configuration. #### Error Response - **VaultError** - If configuration fails. ``` -------------------------------- ### Policy Combination: OR Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/pki/struct.PkiHandler.html?search= Creates a new Policy that returns Action::Follow if either the original policy or the provided policy returns Action::Follow. ```APIDOC ## fn or(self, other: P) -> Or ### Description Creates a new `Policy` that returns `Action::Follow` if either `self` or `other` returns `Action::Follow`. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example Not applicable (SDK method) ### Response #### Success Response Returns a new `Or` policy type. #### Response Example Not applicable (SDK method) ``` -------------------------------- ### Get Static Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/database.rs.html?search=u32+-%3E+bool Retrieves static credentials for a given name from the Database API. ```APIDOC ## GET /static-creds/{name} ### Description Retrieves static credentials associated with a specific name. ### Method GET ### Endpoint /static-creds/{name} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the static credentials to retrieve. ### Response #### Success Response (200) - The response body will contain the static credentials. The exact structure depends on the Vault server configuration. ``` -------------------------------- ### rekey_init Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html?search= Initializes the rekeying process for the Vault. ```APIDOC ## rekey_init ### Description Initializes the rekeying process for the Vault. This operation starts the process of rotating the master encryption key. ### Method POST (assumed) ### Endpoint /sys/rekey/init (assumed) ### Parameters #### Request Body - **params** (RekeyInitRequest) - Required - Parameters for initializing the rekey process. - **pgp_keys** (array of strings) - Optional - PGP public keys to encrypt the new master key. - **secret_shares** (integer) - Optional - The number of shards for the new master key. - **secret_threshold** (integer) - Optional - The minimum number of shards required to reconstruct the master key. ### Request Example ```json { "secret_shares": 5, "secret_threshold": 3 } ``` ### Response #### Success Response (200) - **RekeyStatus** - The status of the rekeying process. ### Response Example ```json { "progress": 0, "специальный_режим": "rekey", "специальный_режим_description": "Rekeying not initiated." } ``` ``` -------------------------------- ### Get Rekey Status Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Retrieves the current status of the rekeying process. Returns a RekeyStatus object. ```rust pub async fn rekey_status(&self) -> Result ``` -------------------------------- ### VaultClient::new Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search=std%3A%3Avec Creates a new VaultClient instance with a given address and a plaintext token. This is a convenient constructor for basic client setup. For more advanced configuration options, consider using `VaultClient::builder()`. ```APIDOC ## VaultClient::new ### Description Creates a new VaultClient instance with a given address and a plaintext token. This is a convenient constructor for basic client setup. For more advanced configuration options, consider using `VaultClient::builder()`. ### Signature ```rust pub fn new(address: &str, token: &str) -> Result ``` ### Parameters * `address` (&str): The base URL of the Vault server. * `token` (&str): The authentication token for Vault. ### Returns A `Result` containing a `VaultClient` instance on success, or a `VaultError` on failure. ``` -------------------------------- ### Get Raft Configuration Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Retrieves the current Raft cluster configuration. Returns a RaftConfig object. ```rust pub async fn raft_config(&self) -> Result ``` -------------------------------- ### configure Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.GithubAuthOperations.html?search= Configures GitHub authentication settings. Returns an empty result upon success. ```APIDOC ## configure ### Description Configures GitHub authentication settings. Returns an empty result upon success. ### Method Not applicable (SDK method) ### Endpoint Not applicable (SDK method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **config** (GithubConfigRequest) - Required - The GitHub configuration details. ### Request Example ```rust // Example usage: // let github_config = GithubConfigRequest { ... }; // github_auth_operations.configure(&github_config).await?; ``` ### Response #### Success Response (200) - **()** (type) - Indicates successful configuration. #### Response Example ```json // No response body on success ``` ``` -------------------------------- ### PolicyExt Implementation (Or) Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/terraform/struct.TerraformCloudRoleRequest.html?search= Combines two policies, returning `Action::Follow` if either policy returns `Action::Follow`. ```rust fn or(self, other: P) -> Or where T: Policy, P: Policy, ``` -------------------------------- ### Get Leader Information Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/sys/struct.SysHandler.html?search= Retrieves information about the current Vault leader. Returns a LeaderResponse object. ```rust pub async fn leader(&self) -> Result ``` -------------------------------- ### Policy 'or' Implementation Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/auth/struct.GithubTeamInfo.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Combines two policies, returning Action::Follow if either policy returns Action::Follow. ```rust fn or(self, other: P) -> Or where T: Policy, P: Policy, ``` -------------------------------- ### AzureHandler TypeId Implementation Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/azure/struct.AzureHandler.html?search= Implements the Any trait for AzureHandler, providing a way to get the TypeId of the struct. ```rust impl Any for T where T: 'static + ?Sized, { ... } ``` -------------------------------- ### NomadCredentials From Conversions Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/nomad/struct.NomadCredentials.html?search=std%3A%3Avec Demonstrates how to create NomadCredentials from different tuple types. ```APIDOC ## From Conversions for NomadCredentials ### `From<(&str, &str)>` Allows creating `NomadCredentials` from a tuple of string slices for accessor ID and secret ID. ### `From<(String, SecretString)>` Allows creating `NomadCredentials` from a tuple containing a `String` for accessor ID and a `SecretString` for secret ID. ``` -------------------------------- ### Get VaultClient Builder Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html Provides access to the ClientBuilder, which allows for detailed configuration of the VaultClient before instantiation. ```rust pub fn builder() -> ClientBuilder { ClientBuilder::default() } ``` -------------------------------- ### With Namespace Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/client/async_client.rs.html?search=std%3A%3Avec Returns a new client view with a different namespace override. This is a cheap operation as it clones an Arc. ```APIDOC ## with_namespace ### Description Returns a client view with a different namespace override. This is a cheap operation as it clones an Arc. ### Method ```rust #[must_use] pub fn with_namespace(&self, ns: &str) -> Self ``` ### Parameters #### Path Parameters - **ns** (&str) - The namespace to override. ``` -------------------------------- ### Get Terraform Cloud Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/terraform.rs.html Generates credentials (a token) for a specified Terraform Cloud role. ```APIDOC ## GET /creds/{role} ### Description Gets credentials for a specified Terraform Cloud role. ### Method GET ### Endpoint /creds/{role} ### Parameters #### Path Parameters - **role** (string) - Required - The name of the role for which to generate credentials. ### Response #### Success Response (200) - **TerraformCloudToken** (TerraformCloudToken) - The generated credentials. #### Response Example ```json { "example": "TerraformCloudToken" } ``` ``` -------------------------------- ### Get Internal Counters Activity Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/rekey.rs.html Fetches activity data for internal counters within Vault. ```rust pub async fn internal_counters_activity(&self) -> Result { self.client .exec_with_data(Method::GET, "sys/internal/counters/activity", None) .await } ``` -------------------------------- ### Enable Auth Method Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html?search= Enables a new authentication engine (auth mount) at a specified path. ```APIDOC ## enable_auth ### Description Enables a new authentication engine (auth mount) at a specified path. ### Method POST ### Endpoint /sys/auth/{path} ### Parameters #### Path Parameters - **path** (string) - Required - The path where the auth method will be enabled. #### Request Body - **params** (AuthMountParams) - Required - Parameters for configuring the auth method. ``` -------------------------------- ### Wrap Lookup Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/sys/mod.rs.html?search=std%3A%3Avec Performs a lookup on a wrapped response token to get information about it without unwrapping. ```APIDOC ## POST /sys/wrapping/lookup ### Description Performs a lookup on a wrapped response token. ### Method POST ### Endpoint /sys/wrapping/lookup ### Parameters #### Request Body - **token** (string) - Required - The wrapped token to look up. ``` -------------------------------- ### Policy 'and' Implementation Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/types/auth/struct.GithubTeamInfo.html?search=Option%3CT%3E%2C+%28T+-%3E+U%29+-%3E+Option%3CU%3E Combines two policies, returning Action::Follow only if both policies return Action::Follow. ```rust fn and(self, other: P) -> And where T: Policy, P: Policy, ``` -------------------------------- ### Get RabbitMQ Credentials Source: https://docs.rs/vault-client-rs/0.8.0/src/vault_client_rs/api/rabbitmq.rs.html?search= Retrieves RabbitMQ credentials for a given role. Returns a `RabbitmqCredentials` object. ```rust async fn get_credentials(&self, role: &str) -> Result { self.client .exec_with_data( Method::GET, &format!("{}/creds/{}", self.mount, encode_path(role)), None, ) .await } ``` -------------------------------- ### Initialize Vault Source: https://docs.rs/vault-client-rs/0.8.0/vault_client_rs/api/traits/trait.SysOperations.html?search= Initializes the Vault server with provided parameters. ```APIDOC ## init ### Description Initializes the Vault server with provided parameters. ### Method POST ### Endpoint /sys/init ### Parameters #### Request Body - **params** (InitParams) - Required - Initialization parameters. ```