# Managed Object - HostSpecificationManager(vim.profile.host.HostSpecificationManager)

Property of
  ServiceContent
See also
  HostSpecification, HostSubSpecification, HostSystem
Since
  vSphere API 6.5

## Managed Object Description

The HostSpecificationManager provides the functionality to update, restrieve and delete HostSpecification and HostSubSpecification.

Properties

Name | Type | Description
--- | --- | ---
None

Methods

Methods defined in this Managed Object
DeleteHostSpecification, DeleteHostSubSpecification, HostSpecGetUpdatedHosts, RetrieveHostSpecification, UpdateHostSpecification, UpdateHostSubSpecification

# DeleteHostSpecification(deleteHostSpecification)

Delete the host specification of the specified host.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
host P | ManagedObjectReference to a HostSystem | The specified host for which the specification will be deleted. Since vSphere API 6.5

P Required privilege: host

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostSpecificationOperationFailed | Thrown if the method fails when delete the spec.
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:vslm="urn:vslm" name="DeleteHostSpecification" type="vslm:DeleteHostSpecificationRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="DeleteHostSpecificationResponse"> <complexType/> </element>

# DeleteHostSubSpecification(deleteHostSubSpecification)

Delete the host sub specification specified by the provided `subSpecname` of the specified host.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
host P | ManagedObjectReference to a HostSystem | The specified host for which the sub specification will be deleted. Since vSphere API 6.5
subSpecName P | xsd:string | The name of the host sub specification to be deleted. Since vSphere API 6.5

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostSpecificationOperationFailed | Thrown if the method fails when delete the sub spec.
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:vslm="urn:vslm" name="DeleteHostSubSpecification" type="vslm:DeleteHostSubSpecificationRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="DeleteHostSubSpecificationResponse"> <complexType/> </element>

# HostSpecGetUpdatedHosts(getUpdatedHosts)

Query the hosts whose specification was updated in the specified time period. When the `startChangeID` isn't provided, it will return all the host updated before the `endChangeID`. When the `endChangeID` isn't provided, it will return all the hosts updated after `startChangeID`. If both aren't provided, all hosts having host spec will be returned. The format of the change ID is defined at changeID.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
startChangeID* P | xsd:string | The beginning of the time period. Since vSphere API 6.5
endChangeID* P | xsd:string | The ending of the time period. Since vSphere API 6.5

*Need not be set P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
ManagedObjectReference[] to a HostSystem[] | The queried host list.

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:vslm="urn:vslm" name="HostSpecGetUpdatedHosts" type="vslm:HostSpecGetUpdatedHostsRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="HostSpecGetUpdatedHostsResponse"> <complexType> <sequence> <element name="returnval" type="vslm:ManagedObjectReference" minOccurs="0" maxOccurs="unbounded"/> </sequence> </complexType> </element>

# RetrieveHostSpecification(retrieveHostSpecification)

Retrieve the host specification. When the parameter `fromHost` is `true`, the host specification is retrieved from the host; otherwise, it is from the host specification "database" for this manager. When retrieved from host, the copy in host specification "database" will be updated. On success, it will fire a `HostSpecificationChangedEvent`.

Required Privileges
  System.View

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
host P | ManagedObjectReference to a HostSystem | The specified host whose host specification will be retrieved. Since vSphere API 6.5
fromHost P | xsd:boolean | Whether retrieve from the host. Since vSphere API 6.5

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
HostSpecification | The host specification of the specified host.

Faults

Type | Description
--- | ---
HostSpecificationOperationFailed | Thrown if the method fails when retrieve from host.
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:vslm="urn:vslm" name="RetrieveHostSpecification" type="vslm:RetrieveHostSpecificationRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="RetrieveHostSpecificationResponse"> <complexType> <sequence> <element name="returnval" type="vslm:HostSpecification"/> </sequence> </complexType> </element>

# UpdateHostSpecification(updateHostSpecification)

Update the host specification with the provided copy. If there is no host specification for the host, create the host specification for this host in the host specification "database"; otherwise, update the host specification with the provided. HostSpecification object. On success, it will fire a `HostSpecificationChangedEvent`.

Required Privileges
  Profile.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
host P | ManagedObjectReference to a HostSystem | The host whose specification will be updated. Since vSphere API 6.5
hostSpec P | HostSpecification | The new host specification to be updated with. Since vSphere API 6.5

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostSpecificationOperationFailed | Thrown if the method fails.
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:vslm="urn:vslm" name="UpdateHostSpecification" type="vslm:UpdateHostSpecificationRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="UpdateHostSpecificationResponse"> <complexType/> </element>

# UpdateHostSubSpecification(updateHostSubSpecification)

Update the host specification with the provided host sub specification. If there is no host specification for the host, create the host specification, which contains only the provided host sub specification, for this host; otherwise, add or update the host specification with the provided HostSubSpecification object. This method provides a way to incrementally build the host specification. On success, it will fire a `HostSpecificationChangedEvent`.

Required Privileges
  Profile.Edit

Parameters

Name | Type | Description
--- | --- | ---
_this | ManagedObjectReference | A reference to the HostSpecificationManager used to make the method call.
host P | ManagedObjectReference to a HostSystem | The host whose specification will be updated. Since vSphere API 6.5
hostSubSpec P | HostSubSpecification | The data object for the new host sub specification. Since vSphere API 6.5

P Required privilege - see tooltip for details

Return Value

Type | Description
--- | ---
None

Faults

Type | Description
--- | ---
HostSpecificationOperationFailed | Thrown if the method fails.
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:vslm="urn:vslm" name="UpdateHostSubSpecification" type="vslm:UpdateHostSubSpecificationRequestType"/> <element xmlns="http://www.w3.org/2001/XMLSchema" xmlns:vslm="urn:vslm" name="UpdateHostSubSpecificationResponse"> <complexType/> </element>