# Managed Object - Profile(vim.profile.Profile)

Property of
  ComplianceResult, HostProfileManagerCompositionResultResultElement, HostProfileManagerCompositionValidationResultResultElement, InvalidProfileReferenceHost, ProfileEventArgument, ProfileManager
Parameter to
  CheckCompliance_Task, ClearComplianceStatus, CompositeHostProfile_Task, CompositeHostProfile_Task, CreateDefaultProfile, QueryComplianceStatus, QueryExpressionMetadata, QueryHostProfileMetadata, QueryPolicyMetadata, QueryProfileStructure, ValidateHostProfileComposition_Task, ValidateHostProfileComposition_Task
Returned by
  CreateProfile, FindAssociatedProfile
Extended by
  ClusterProfile, HostProfile
See also
  ComplianceResult, ManagedEntity, ProfileConfigInfo, ProfileDescription
Since
  vSphere API 4.0

## Managed Object Description

The `Profile` managed object is the base class for host and cluster profiles.

Properties

Name | Type | Description
--- | --- | ---
complianceStatus | xsd: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.
config P | ProfileConfigInfo | Configuration data for the profile.
createdTime | xsd:dateTime | Time at which the profile was created.
description* | ProfileDescription | Deprecated. As of vSphere API 5.0. use RetrieveDescription instead. Localizable description of the profile
entity* | ManagedObjectReference[] to a ManagedEntity[] | List of managed entities associated with the profile.
modifiedTime | xsd:dateTime | Time at which the profile was last modified.
name | xsd:string | Name of the profile.

*May not be present P Required privilege: Profile.Edit

Methods

Methods defined in this Managed Object
AssociateProfile, CheckProfileCompliance_Task, DestroyProfile, DissociateProfile, ExportProfile, RetrieveDescription

# AssociateProfile(associateEntities)

Associate a profile with a managed entity. You can check the compliance of entities associated with a profile by calling the CheckProfileCompliance_Task method.

Required Privileges
  Profile.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.
entity P | ManagedObjectReference[] to a ManagedEntity[] | 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. Since vSphere API 4.0

P Required privilege: entity

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="AssociateProfile" type="pbm:AssociateProfileRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="AssociateProfileResponse"> <complexType/> </element>

# CheckProfileCompliance_Task(checkCompliance)

Check compliance of an entity against a Profile.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.
entity* P | ManagedObjectReference[] to a ManagedEntity[] | 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. Since vSphere API 4.0

*Need not be set P Required privilege: entity

Return Value

Type | Description
--- | ---
pbm.Task | This method returns a Task object with which to monitor the operation.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

# DestroyProfile(destroy)

Destroy the profile.

Required Privileges
  Profile.Delete

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="DestroyProfile" type="pbm:DestroyProfileRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="DestroyProfileResponse"> <complexType/> </element>

# DissociateProfile(dissociateEntities)

Remove the association between a profile and a managed entity.

Required Privileges
  Profile.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.
entity* P | ManagedObjectReference[] to a ManagedEntity[] | 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. Since vSphere API 4.0

*Need not be set P Required privilege: entity

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="DissociateProfile" type="pbm:DissociateProfileRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="DissociateProfileResponse"> <complexType/> </element>

# ExportProfile(exportProfile)

Export the profile in a serialized form. To use the serialized string to create a profile, specify a ProfileSerializedCreateSpec when you call the HostProfileManager.CreateProfile method.

Required Privileges
  Profile.Export

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.

Return Value

Type | Description
--- | ---
xsd:string | Serialized form of the profile.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="ExportProfile" type="pbm:ExportProfileRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="ExportProfileResponse"> <complexType> <sequence> <element name="returnval" type="xsd:string"/> </sequence> </complexType> </element>

# RetrieveDescription(retrieveDescription)

Returns the localizable description for the profile.

Required Privileges
  System.View
Since
  vSphere API 5.0

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the Profile used to make the method call.

Return Value

Type | Description
--- | ---
ProfileDescription | Profile divided into sections containing element descriptions and messages.

Faults

Type | Description
--- | ---
RuntimeFault | Thrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Events

Type
None

Show WSDL type definition
<element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="RetrieveDescription" type="pbm:RetrieveDescriptionRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:pbm="urn:pbm" name="RetrieveDescriptionResponse"> <complexType> <sequence> <element name="returnval" type="pbm:ProfileDescription" minOccurs="0"/> </sequence> </complexType> </element>