pub struct CryptoManagerHostKms { /* private fields */ }Implementations§
Source§impl CryptoManagerHostKms
impl CryptoManagerHostKms
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn add_key(&self, key: &CryptoKeyPlain) -> Result<()>
pub async fn add_key(&self, key: &CryptoKeyPlain) -> Result<()>
Add an existing key.
Required privileges: Cryptographer.ManageKeys
§Parameters:
§key
[in] The cryptographic key to add.
§Errors:
AlreadyExists: in case the key is already in the key cache
InvalidState: in case the host is not Crypto Safe
InvalidArgument: in case the keyID is duplicated or key properties are incorrect.
Sourcepub async fn add_keys(
&self,
keys: Option<&[CryptoKeyPlain]>,
) -> Result<Option<Vec<CryptoKeyResult>>>
pub async fn add_keys( &self, keys: Option<&[CryptoKeyPlain]>, ) -> Result<Option<Vec<CryptoKeyResult>>>
Sourcepub async fn change_key_task(
&self,
new_key: &CryptoKeyPlain,
) -> Result<ManagedObjectReference>
pub async fn change_key_task( &self, new_key: &CryptoKeyPlain, ) -> Result<ManagedObjectReference>
Change the key used for core dump encryption Note: CryptoManagerHost.CryptoManagerHostEnable must be called first If successful, a “best effort” will be made to “in place” shallow recrypt any core dumps found in /var/core to use the new key.
Required privileges: Cryptographer.RegisterHost
§Parameters:
§new_key
The key that replaces the existing core dump encryption key
§Returns:
Refers instance of Task.
§Errors:
InvalidState: if the host is not in safe state
Sourcepub async fn crypto_manager_host_disable(&self) -> Result<()>
pub async fn crypto_manager_host_disable(&self) -> Result<()>
Disable encryption on host, if host was in crypto safe mode, put it in pendingIncapable state and host will be crypto incapable after a reboot Note: A reboot is expected from user after successfully invoking this API Note: Do not call this API if the host is in vSAN encrypted cluster
Required privileges: Cryptographer.RegisterHost
§Errors:
InvalidState: if the host is already crypto disabled.
Sourcepub async fn crypto_manager_host_enable(
&self,
initial_key: &CryptoKeyPlain,
) -> Result<()>
pub async fn crypto_manager_host_enable( &self, initial_key: &CryptoKeyPlain, ) -> Result<()>
Begin core dump encryption by specifying the encryption key and put the host in safe state Note: CryptoManagerHost.CryptoManagerHostPrepare must be called first
Required privileges: Cryptographer.RegisterHost
§Parameters:
§initial_key
The key to be used for core dump encryption
§Errors:
InvalidState: if the host is in incapable state
AlreadyExists: if the host is in safe state and initialKey differs from the existing core dump encryption key
Sourcepub async fn get_crypto_key_status(
&self,
keys: Option<&[CryptoKeyId]>,
) -> Result<Option<Vec<CryptoManagerHostKeyStatus>>>
pub async fn get_crypto_key_status( &self, keys: Option<&[CryptoKeyId]>, ) -> Result<Option<Vec<CryptoManagerHostKeyStatus>>>
Sourcepub async fn list_keys(
&self,
limit: Option<i32>,
) -> Result<Option<Vec<CryptoKeyId>>>
pub async fn list_keys( &self, limit: Option<i32>, ) -> Result<Option<Vec<CryptoKeyId>>>
List keys.
* When executed against the host, lists all the keys added to the host’s key cache by CryptoManager.AddKey/CryptoManager.AddKeys. * When executed against the VC, lists all the keys used by the correctly registered VMs, and the host key.
Required privileges: Cryptographer.ManageKeys
§Parameters:
§limit
[in] maximum keys to return.
§Returns:
List of known keys.
Sourcepub async fn crypto_manager_host_prepare(&self) -> Result<()>
pub async fn crypto_manager_host_prepare(&self) -> Result<()>
Prime the host to receive sensitive information and put the host in prepared state
Required privileges: Cryptographer.RegisterHost
§Errors:
InvalidState: if the host is not in incapable state
Sourcepub async fn remove_key(&self, key: &CryptoKeyId, force: bool) -> Result<()>
pub async fn remove_key(&self, key: &CryptoKeyId, force: bool) -> Result<()>
Remove a key (only the UUID is needed to remove).
If “force” is set, removal will happen even if the key is in use.
Required privileges: Cryptographer.ManageKeys
§Parameters:
§key
[in] The key to remove.
§force
[in] Remove the key even if in use or not existent.
§Errors:
InvalidArgument: in case the keyID is not found and “force” is false.
ResourceInUse: if the key is used to encrypt any object and “force” is false.
Sourcepub async fn remove_keys(
&self,
keys: Option<&[CryptoKeyId]>,
force: bool,
) -> Result<Option<Vec<CryptoKeyResult>>>
pub async fn remove_keys( &self, keys: Option<&[CryptoKeyId]>, force: bool, ) -> Result<Option<Vec<CryptoKeyResult>>>
Trait Implementations§
Source§impl Clone for CryptoManagerHostKms
impl Clone for CryptoManagerHostKms
Source§fn clone(&self) -> CryptoManagerHostKms
fn clone(&self) -> CryptoManagerHostKms
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more