Skip to main content

CryptoManagerHostKms

Struct CryptoManagerHostKms 

Source
pub struct CryptoManagerHostKms { /* private fields */ }

Implementations§

Source§

impl CryptoManagerHostKms

Source

pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self

Source

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.

Source

pub async fn add_keys( &self, keys: Option<&[CryptoKeyPlain]>, ) -> Result<Option<Vec<CryptoKeyResult>>>

Add multiple existing keys.

Required privileges: Cryptographer.ManageKeys

§Parameters:
§keys

[in] List of cryptographic keys to add.

§Returns:

the result for each key operation.

§Errors:

InvalidState: in case the host is not Crypto Safe

Source

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

Source

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.

Source

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

Source

pub async fn get_crypto_key_status( &self, keys: Option<&[CryptoKeyId]>, ) -> Result<Option<Vec<CryptoManagerHostKeyStatus>>>

Get the key status on the host.

Since: vSphere API Release 8.0.1.0

Required privileges: Cryptographer.ManageKeys

§Parameters:
§keys

[in] Cryptographic keys to query status.

§Returns:

the key status.

Source

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.

Source

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

Source

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.

Source

pub async fn remove_keys( &self, keys: Option<&[CryptoKeyId]>, force: bool, ) -> Result<Option<Vec<CryptoKeyResult>>>

Remove multiple keys (only the UUID is needed to remove).

If “force” is set, removal will happen even if they are in use.

Required privileges: Cryptographer.ManageKeys

§Parameters:
§keys

[in] List of keys to remove.

§force

[in] Remove the key even if in use. Always successful.

Source

pub async fn enabled(&self) -> Result<bool>

Indicate if the encryption feature is enabled.

Trait Implementations§

Source§

impl Clone for CryptoManagerHostKms

Source§

fn clone(&self) -> CryptoManagerHostKms

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: 'static,

Source§

fn as_any_ref<'a>(&'a self) -> &'a (dyn Any + 'static)

Cast a reference to Any trait.

Source§

fn as_any_box(self: Box<T>) -> Box<dyn Any>

Cast to a boxed reference to Any trait.

Source§

fn type_id(&self) -> TypeId

Get the underlying type identifier.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<To, T> CastInto<To> for T
where To: CastFrom<T> + ?Sized, T: 'static + ?Sized,

Source§

fn into_ref<'a>(&'a self) -> Option<&'a To>

Casts a reference to a trait object. If the cast fails, std::option::Option::None is returned.
Source§

fn into_box(self: Box<T>) -> Result<Box<To>, Box<dyn Any>>

Casts a boxed trait object to another trait object. If the cast fails, the original boxed trait object is returned in std::result::Result::Err.
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,