pub struct ProfileManager { /* private fields */ }Expand description
This class is responsible for managing Profiles.
Implementations§
Source§impl ProfileManager
impl ProfileManager
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn create_profile(
&self,
create_spec: &dyn ProfileCreateSpecTrait,
) -> Result<ManagedObjectReference>
pub async fn create_profile( &self, create_spec: &dyn ProfileCreateSpecTrait, ) -> Result<ManagedObjectReference>
Create a profile from the specified CreateSpec.
Required privileges: Profile.Create
§Parameters:
§create_spec
Specification for the profile being created. Usually a derived class CreateSpec can be used to create the Profile.
§Returns:
Profile created from the specified createSpec.
Refers instance of Profile.
§Errors:
DuplicateName: If a profile with the specified name already exists.
InvalidProfileReferenceHost: if the specified reference host is incompatible or no reference host has been specified.
Sourcepub async fn find_associated_profile(
&self,
entity: &ManagedObjectReference,
) -> Result<Option<Vec<ManagedObjectReference>>>
pub async fn find_associated_profile( &self, entity: &ManagedObjectReference, ) -> Result<Option<Vec<ManagedObjectReference>>>
Get the profile(s) to which this entity is associated.
The list of profiles will only include profiles known to this profileManager.
Required privileges: System.View
§Parameters:
§entity
Entity for which profile is being looked up.
Refers instance of ManagedEntity.
§Returns:
Refers instances of Profile.
Sourcepub async fn query_policy_metadata(
&self,
policy_name: Option<&[String]>,
profile: Option<&ManagedObjectReference>,
) -> Result<Option<Vec<ProfilePolicyMetadata>>>
pub async fn query_policy_metadata( &self, policy_name: Option<&[String]>, profile: Option<&ManagedObjectReference>, ) -> Result<Option<Vec<ProfilePolicyMetadata>>>
Get the Metadata information for the policyNames.
PolicyNames are available with the defaultProfile obtained by invoking the method createDefaultProfile.
Required privileges: System.View
§Parameters:
§policy_name
Retrieve metadata for the specified policyNames. If policyName is not specified, metadata for all policies will be returned.
§profile
Base profile whose context needs to be used during the operation
Refers instance of Profile.
§Returns:
The metadata information for the policy.
Trait Implementations§
Source§impl Clone for ProfileManager
impl Clone for ProfileManager
Source§fn clone(&self) -> ProfileManager
fn clone(&self) -> ProfileManager
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more