Managed Object - CustomFieldsManager

Property of
ServiceContent
See also
CustomFieldDef, ManagedEntity

Managed Object Description

The CustomFieldsManager object is used to add and remove custom fields to managed entities.

The custom fields values set on managed entities are available through the customValue property and through the summary objects for VirtualMachine and HostSystem. They are not available directly through this managed object.

This functionality is only available through VirtualCenter.

Properties

Name Type Description
field* PCustomFieldDef[] List of custom fields defined on this server. The fields are sorted by name.
*May not be presentP Required privilege: System.View

Methods

Methods defined in this Managed Object
AddCustomFieldDef, RemoveCustomFieldDef, RenameCustomFieldDef, SetField

AddCustomFieldDef

Creates a new custom field.
Required Privileges
Global.ManageCustomFields

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the CustomFieldsManager used to make the method call.
namexsd:string The name of the field.

Return Value

Type Description
CustomFieldDef

Faults

Type Description
DuplicateNameThrown if a custom field with the name already exists.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RemoveCustomFieldDef

Removes a custom field. This also removes all values assigned to this custom field.
Required Privileges
Global.ManageCustomFields

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the CustomFieldsManager used to make the method call.
keyxsd:int The unique key for the field definition.

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if no custom field with that key exists.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



RenameCustomFieldDef

Renames a custom field.
Required Privileges
Global.ManageCustomFields

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the CustomFieldsManager used to make the method call.
keyxsd:int The unique key for the field definition.
namexsd:string The new name for the fieldp

Return Value

Type Description
None

Faults

Type Description
DuplicateNameThrown if a custom field with the name already exists.
InvalidArgumentThrown if no custom field with that key exists.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition



SetField

Assigns a value to a custom field on an entity.
Required Privileges
None

Parameters

NameTypeDescription
_thisManagedObjectReference A reference to the CustomFieldsManager used to make the method call.
entity PManagedObjectReference
to a ManagedEntity
keyxsd:int
valuexsd:string
P Required privilege: Global.SetCustomField

Return Value

Type Description
None

Faults

Type Description
InvalidArgumentThrown if no custom field with that key exists.
RuntimeFaultThrown if any type of runtime fault is thrown that is not covered by the other faults; for example, a communication error.

Show WSDL type definition