Modify LDAP Server Settings

Modifies the settings of the LDAP server that has the identifier ldapServerId in vCenter Chargeback Manager. The changes take effect immediately.

Syntax

The syntax for calling this API is:

PUT <Base_URL>/ldapServer/{ldapServerId}

A sample API call is as follows:

PUT https://123.123.123.123/vCenter-CB/api/ldapServer/1

User Privilege

You must have the Super User role or the Administrator role.

Request Body Parameters

The request XML for this API can include the parameters described in the following table.

XPath

Type

Min Occurs

Max Occurs

Description

LdapServers/LdapServer

 

1

1

This is the LdapServer element.

LdapServers/LdapServer/@id

xs:int

1

1

The LDAP server ID. You cannot modify the LDAP server ID.

LdapServers/LdapServer/Host

xs:string

1

1

URL with the IP address or the FQDN of the LDAP server.

LdapServers/LdapServer/Port

xs:int

1

1

Port on which the LDAP Server service is listening.

LdapServers/LdapServer/ LdapServerName

xs:string

1

1

Name of the LDAP server to be used by an LDAP user logging into vCenter Chargeback Manager.

LdapServers/LdapServer/BaseDn

xs:string

0

1

The distinguished name (DN) of the entity in the LDAP hierarchy from which groups and users can be added to the application. If not sepcified, vCenter Chargeback Manager automatically fetches the root base dn and uses this value.

CAUTION: If you change the BaseDN to the DN of an entity that is lower in the LDAP hierarchy compared to the currently set DN, then LDAP users that exist above the new DN will not be able to log in to vCenter Chargeback Manager, and the resources created by them in the application, such as hierarchies, cost model, and reports, might get orphaned and become unusable.

LdapServers/LdapServer/UserName

xs:string

1

1

The LDAP account for authentication on the LDAP server

LdapServers/LdapServer/Password

xs:string

1

1

Password for the user name entered

LdapServers/LdapServer/LdapServerType/@id

xs:int

1

1

Integer to select type of the LDAP server. Currently the only supported LDAP Server type is Active Directory.

LdapServers/LdapServer/Limit

xs:int

0

1

The maximum number of Active Directory users or groups to fetch and display in the Add Users Account screen of the application. The default value of the limit is 500.

LdapServers/LdapServer/SslEnabled

xs:boolean

1

1

Indicates whether communication with the LDAP Server is done over SSL or not. Valid value can be true or false.

A sample request XML is provided here.

API Response

If the request succeeds, the API modifies the LDAP server settings in vCenter Chargeback Manager. The following table provides the information about the response XML.

XPath

Type

Min Occurs

Max Occurs

Description

LdapServers/LdapServer

 

1

1

This is the LdapServer element.

LdapServers/LdapServer/@id

xs:int

1

1

The LDAP server ID. This ID will be the same as the LDAP Server ID provided in the URL.

LdapServers/LdapServer/Host

xs:string

1

1

URL with the IP address or the FQDN of the LDAP server.

LdapServers/LdapServer/Port

xs:int

1

1

Port on which the LDAP Server service is listening.

LdapServers/LdapServer/BaseDn

xs:string

1

1

The distinguished name (DN) of the entity in the LDAP hierarchy from which groups and users can be added to the application.

LdapServers/LdapServer/ LdapServerName

xs:string

1

1

Name of the LDAP server used by an LDAP user logging into vCenter Chargeback Manager.

LdapServers/LdapServer/LdapServerType/@id

xs:int

1

1

Integer to indicate type of the LDAP server. Currently the only supported LDAP Server type is Active Directory.

LdapServers/LdapServer/Limit

xs:int

1

1

The maximum number of Active Directory users or groups retrieved
and to be displayed in the Add Users Account screen of the application.

LdapServers/LdapServer/SslEnabled

xs:boolean

1

1

Indicates whether communication with the LDAP Server is done over SSL or not. Valid value can be true or false.

A sample response is provided here.

Error Response

The following table explains the possible error codes.

Error code

Description

VCENTER_COMMON_ERR_INVALID_DATA_LENGTH

Returned if the LDAP Server URL exceeds 255 characters or if the password exceeds 1024 characters.

VCB_ERR_LDAP_SERVER_CONNECTION

Failed to connect to LDAP server

VCB_ERR_LDAP_SERVER_AUTHENTICATION

Failed to authenticate with LDAP Server

VCB_ERR_INVALID_LDAP_BASE_DN

Returned if the LDAP server base domain name is invalid.

VCB_ERR_INVALID_LDAP_USER_NAME

Returned if the LDAP server user name exceeds 255 characters

VCB_ERR_INVALID_LDAP_TYPE_ID

Returned if the LDAP type is unsupported (current LDAP type supported is Active Directory)

VCB_ERR_LDAP_SERVER_NOT_FOUND

Returned if the LDAP Server Id is invalid

VCB_ERR_LDAP_SERVER_EXISTS

Returned if the LDAP Server is already added to vCenter Chargeback Manager.

VCB_ERR_UNTRUSTED_SSL_CERTIFICATE

Returned if the SSL certificate is untrusted.