Modifies details of the vCenter Server that has the identifier vCenterServerId. If the vCenter Server configuration changes, you must make the corresponding changes in vCenter Chargeback Manager. Changes take effect immediately, although active user sessions are not impacted. The vCenterServerId comes from the XML response of the Add vCenter Server API.
The syntax for calling this API is:
PUT /vCenterServer/{vCenterServerId}
A sample API call is as follows:
PUT https://123.123.123.123/vCenter-CB/api/vCenterServer/99
You must have the Super User role or Administrator role.
You cannot modify the vCenter Server ID, host name or IP address of the vCenter Server.
The request XML for this API can include the parameters described in the following table.
XPath |
Type |
Min Occurs |
Max Occurs |
Description |
VCenterServers/VCenterServer |
|
1 |
1 |
This is the vCenterServer element. |
VCenterServers/VCenterServer/@id |
xs:int |
1 |
1 |
The vCenter Server ID. This ID must be the same as the vCenterServerId specified in the API URL. |
VCenterServers/VCenterServer/Name |
xs:string |
1 |
1 |
Short display name for the vCenter Server. |
VCenterServers/VCenterServer/Description |
xs:string |
0 |
1 |
A description of the vCenter Server. |
VCenterServers/VCenterServer/UserName |
xs:string |
1 |
1 |
User name to access the vCenter Server. |
VCenterServers/VCenterServer/Password |
xs:string |
1 |
1 |
Password for the user name entered. |
VCenterServers/VCenterServer/PluginRegistered |
xs:boolean |
1 |
1 |
Whether to register vCenter Chargeback Manager as a vSphere Client plugin. The value can be true or false. |
VCenterServers/VCenterServer/StatsSync |
xs:boolean |
1 |
1 |
Whether to replicate statistics from the vCenter Server database to the vCenter Chargeback Manager database. |
VCenterServers/VCenterServer/DataSourceType/@id |
xs:integer |
1 |
1 |
Integer to specify the database type for the vCenter Server database. The database type can be either SQL Server (default) or Oracle. An ID value of 1 means SQL Server and 2 means Oracle. |
VCenterServers/VCenterServer/DataSourceUrl |
xs:string |
1 |
1 |
URL of the system on which the vCenter Chargeback Manager database is installed along with either the port at which the database listener service is running or the vCenter Chargeback Manager database instance name. |
VCenterServers/VCenterServer/DataSourceName |
xs:string |
1 |
1 |
Name of the vCenter Server database. For example, The DataSourceName is ignored if you specify a JDBC URL for DataSourceUrl. |
VCenterServers/VCenterServer/DataSourceAuthType/@id |
xs:integer |
0 |
1 |
Integer to select authentication type for the vCenter Server database. For SQL Server, you can use Windows authentication or SQL authentication (credential-based authentication). ID value of 1 means SQL authentication (credential-based authentication) and ID value of 2 indicates Windows authentication. |
VCenterServers/VCenterServer/DataSourceUserName |
xs:string |
0 |
1 |
A database user name to access the vCenter Server database. Ensure that this is not the same user that vCenter Server uses to connect to the vCenter Server database. If you have selected Windows authentication, then provide a domain user name to access the vCenter Server database. The domain user name must be of the form user@domain.com or domain\user. If you do not specify a domain user name, then vCenter Chargeback Manager uses the details of the domain user who started the current session of the vCenter Chargeback Manager service to access the vCenter Server database. |
VCenterServers/VCenterServer/DataSourcePassword |
xs:string |
0 |
1 |
Password for the database user name entered. |
VCenterServers/VCenterServer/ForceUpdate |
xs:boolean |
0 |
1 |
Whether to force data source updates. |
A sample XML request is provided here.
If the request succeeds, the API returns an XML file that indicates the status of the operation.
A sample response is provided here.
The following table explains the possible error codes.
Error code |
Description |
VCB_ERR_INVALID_VC_ID |
Returned if the vCenter Server id is invalid |
VCENTER_COMMON_ERR_INVALID_DATA_LENGTH |
Returned if:
|
VCB_ERR_VC_EXISTS |
Returned if the same vCenter Server exists |
VCB_ERR_INVALID_VC_DISPLAY_NAME |
Returned if a vCenter Server with the same display name exists or if the display name exceeds 255 characters |
VCB_ERR_VC_CONN |
Failed to connect to vCenter Server |
VCB_ERR_INVALID_VC_DESCRIPTION |
Returned if the vCenter Server description exceeds 512 characters. |
VCB_ERR_INVALID_VC_USER_NAME |
Returned if the vCenter Server user name exceeds 255 characters. |
VCB_ERR_INVALID_DATA_SOURCE_NAME |
Returned if the vCenter Server datasource name exceeds 128 characters. |
VCB_ERR_INVALID_DATA_SOURCE_USER_NAME |
Returned if the vCenter Server datasource user name exceeds 255 characters. |
VCENTER_COMMON_ERR_DAS_DB_CONN |
Failed to connect to the vCenter Server database |
VCB_ERR_INVALID_DB_TYPE |
Returned if the data source type is invalid |
VCB_ERR_INVALID_AUTH_TYPE |
Returned if the authentication type is invalid |
VCB_ERR_UNTRUSTED_SSL_CERTIFICATE |
Returned if the SSL certificate is untrusted. |