Scripting Object - VcCustomFieldsManager

Attribute of
VcSdkConnection, VcServiceContent

Scripting 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 VcManagedEntity property and through the summary objects for VcVirtualMachine and VcHostSystem. They are not available directly through this managed object.

This functionality is only available through VirtualCenter.

Attributes

Name Type Description
field*VcCustomFieldDef []

List of custom fields defined on this server. The fields are sorted by name.
idstring

returns the id of this ManagedObject
referenceVcManagedObjectReference

returns the ManagedObjectReference of this ManagedObject
sdkConnectionVcSdkConnection

returns the parent SdkConnection
vimHostVcSdkConnection

returns the parent SdkConnection (deprecated)
vimTypestring

returns the type of this ManagedObject
*May not be present

Methods

Methods defined in this Scripting Object
addCustomFieldDef, createTrigger, removeCustomFieldDef, renameCustomFieldDef, setField

addCustomFieldDef

Creates a new custom field. If the moType is specified, the field will only be available for that type of managed object.

Parameters

NameTypeDescription
namestring

The name of the field.
moType*string

The managed object type to which this field will apply
fieldDefPolicy*VcPrivilegePolicyDef

Privilege policy to apply to FieldDef being created
fieldPolicy*VcPrivilegePolicyDef

Privilege policy to apply to instances of field
*Need not be set

Return Value

Type Description
VcCustomFieldDef

removeCustomFieldDef

Removes a custom field. This also removes all values assigned to this custom field.

Parameters

NameTypeDescription
keynumber

The unique key for the field definition.

Return Value

Type Description
None

renameCustomFieldDef

Renames a custom field.

Parameters

NameTypeDescription
keynumber

The unique key for the field definition.
namestring

The new name for the field.

Return Value

Type Description
None

setField

Assigns a value to a custom field on an entity.

Parameters

NameTypeDescription
entityVcManagedEntity

keynumber

valuestring


Return Value

Type Description
None

createTrigger

Create a trigger from this ManagedObject

Parameters

NameTypeDescription
timeoutnumber

Waiting timout in seconds
filterstring

The monitored vCenter API filter
conditionstring

The condition in OGNL language
filterToSync*string

The vCenter API filter used to synchronize the content of the session
*Need not be set

Return Value

Type Description
Trigger