Hi All,
Is it possible to udpate Configuration Element in a script?
Thanks
Yes this is possible. Take a look into the API Explorer (on the right top 'Tools' --> 'API Explorer' and search in the API for the ConfigurationElement.
Read an attribute of a configuration element:
var myAttributeValue = ConfigurationElement.getAttributeWithKey( "Attribute Name" );
Write an attribute value to a configuration element:
ConfigurationElement.setAttributeWithKey( "Attribute Name",myAttributeValue );
You also can loop through all attributes of a configuration element:
yes, it is.
Check this blog article here: Configuration Elements revisited | VMware vCenter Orchestrator Blog - VMware Blogs
I have gone through that blog... My requirement is to read configuration element and update attribute value.
Yes this is possible. Take a look into the API Explorer (on the right top 'Tools' --> 'API Explorer' and search in the API for the ConfigurationElement.
Read an attribute of a configuration element:
var myAttributeValue = ConfigurationElement.getAttributeWithKey( "Attribute Name" );
Write an attribute value to a configuration element:
ConfigurationElement.setAttributeWithKey( "Attribute Name",myAttributeValue );
You also can loop through all attributes of a configuration element: