pub struct Profile { /* private fields */ }Expand description
The Profile managed object is the base class for host and cluster
profiles.
Implementations§
Source§impl Profile
impl Profile
pub fn new(client: Arc<dyn VimClient>, mo_id: &str) -> Self
Sourcepub async fn associate_profile(
&self,
entity: &[ManagedObjectReference],
) -> Result<()>
pub async fn associate_profile( &self, entity: &[ManagedObjectReference], ) -> Result<()>
Associate a profile with a managed entity.
You can check the compliance of entities associated with a profile by calling the Profile.CheckProfileCompliance_Task method.
Required privileges: Profile.Edit
§Parameters:
§entity
The entity(s) to associate with the profile. If an entity is already associated with the profile, the association is maintained and the vCenter Server does not perform any action.
Refers instances of ManagedEntity.
Sourcepub async fn check_profile_compliance_task(
&self,
entity: Option<&[ManagedObjectReference]>,
) -> Result<ManagedObjectReference>
pub async fn check_profile_compliance_task( &self, entity: Option<&[ManagedObjectReference]>, ) -> Result<ManagedObjectReference>
Check compliance of an entity against a Profile.
Required privileges: System.View
§Parameters:
§entity
If specified, the compliance check is performed on this entity. If the entity is not specified, the vCenter Server runs a compliance check on all the entities associated with the profile. The entity does not have to be associated with the profile.
Refers instances of ManagedEntity.
§Returns:
This method returns a Task object with which to monitor the operation.
Refers instance of Task.
Sourcepub async fn destroy_profile(&self) -> Result<()>
pub async fn destroy_profile(&self) -> Result<()>
Destroy the profile.
Required privileges: Profile.Delete
Sourcepub async fn dissociate_profile(
&self,
entity: Option<&[ManagedObjectReference]>,
) -> Result<()>
pub async fn dissociate_profile( &self, entity: Option<&[ManagedObjectReference]>, ) -> Result<()>
Remove the association between a profile and a managed entity.
Required privileges: Profile.Edit
§Parameters:
§entity
List of entities. The vCenter Server will remove the associations that the profile has with the entities in the list. If unset, the Server removes all the associations that the profile has with any managed entities in the inventory. If the specified entity is not associated with the profile, the Server does not perform any action.
Refers instances of ManagedEntity.
Sourcepub async fn export_profile(&self) -> Result<String>
pub async fn export_profile(&self) -> Result<String>
Export the profile in a serialized form.
To use the serialized string to create a profile, specify a ProfileSerializedCreateSpec when you call the HostProfileManager.ProfileManager.CreateProfile method.
Required privileges: Profile.Export
§Returns:
Serialized form of the profile.
Sourcepub async fn retrieve_description(&self) -> Result<Option<ProfileDescription>>
pub async fn retrieve_description(&self) -> Result<Option<ProfileDescription>>
Returns the localizable description for the profile.
Required privileges: System.View
§Returns:
Profile divided into sections containing element descriptions and messages.
Sourcepub async fn compliance_status(&self) -> Result<String>
pub async fn compliance_status(&self) -> Result<String>
Overall compliance of entities associated with this profile.
If one of the entities is out of compliance, the profile is nonCompliant.
If all entities are in compliance, the profile is compliant.
If the compliance status of one of the entities is not known, compliance status
of the profile is unknown.
See ComplianceResultStatus_enum.
Sourcepub async fn config(&self) -> Result<Box<dyn ProfileConfigInfoTrait>>
pub async fn config(&self) -> Result<Box<dyn ProfileConfigInfoTrait>>
Configuration data for the profile.
Required privileges: Profile.Edit
Sourcepub async fn created_time(&self) -> Result<String>
pub async fn created_time(&self) -> Result<String>
Time at which the profile was created.
Sourcepub async fn description(&self) -> Result<Option<ProfileDescription>>
pub async fn description(&self) -> Result<Option<ProfileDescription>>
Deprecated as of vSphere API 5.0. use Profile.RetrieveDescription instead.
Localizable description of the profile
Sourcepub async fn modified_time(&self) -> Result<String>
pub async fn modified_time(&self) -> Result<String>
Time at which the profile was last modified.