update_datasource_by_name

This command updates a datasource definition identified by name.

This API is available in Guardium V9.5 and later.

REST API syntax

This API is available as a REST service with the PUT method. Call this API as follows:
PUT https://[Guardium hostname or IP address]:8443/restAPI/update_datasource_by_name

GuardAPI syntax

update_datasource_by_name parameter=value

Parameters

Parameter Value type Description
awsSecretsManagerConfigName String For valid values, call update_datasource_by_name from the command line with --help=true.
conProperty String Use only if additional connection properties must be included on the JDBC URL to establish a JDBC connection with the datasource.
Note: For a Sybase database with a default character set of Roman8, enter the following property: CHARSET=utf8.
customProps String  
customURL String Defines the connection string to the datasource. By default, the connection is made using the host, port, instance, and other properties defined by the API parameters. This is useful, for example, when creating Oracle Internet Directory (OID) connections.
cyberarkConfigName String The name of the CyberArk configuration on your Guardium system. For valid values, call update_datasource_by_name from the command line with --help=true.
cyberarkObjectName String The CyberArk object name for the Guardium datasource.
dbInstanceAccount String The database account login name to be used by CAS.
dbInstanceDirectory String The database installation directory to be used by CAS.
dbName String For a DB2® datasource, the database name.
description String A description of the datasource.
externalPasswordTypeName String For valid values, call update_datasource_by_name from the command line with --help=true.
hashicorpConfigName String  
hashicorpPath String  
hashicorpRole String  
host String The host name or the IP address of the datasource.
importServerSSLcert Boolean Valid values:
  • 0 (false)
  • 1 (true)
KerberosConfigName String  
name String Required. The datasource to be updated.
newName String Defines a new name for the datasource. The new name must be unique for a datasource on the system.
password String The password for the account identified by the user parameter. If defined, the user parameter must also be used.
port Integer The port number of the datasource.
region String For AWS only. For valid values, call update_datasource_by_name from the command line with --help=true.
savePassword Boolean If enabled, savePassword saves and encrypts authentication credentials on the Guardium system. This is required when defining a datasource with an application that runs as a scheduled task (as opposed to on demand). When set to 1, the user and password parameters are required.
Valid values:
  • 0 (false)
  • 1 (true)
secretName String  
serviceName String For an Oracle datasource, the service name.
severity String Severity classification (or impact level) for the datasource.

For valid values, call update_datasource_by_name from the command line with --help=true.

shared String If set to true, share the datasource with other applications. To share the datasource with other users, assign roles from the GUI.
Valid values:
  • Shared
  • Not Shared
  • true
  • false
useExternalPassword Boolean Valid values:
  • 0 (false)
  • 1 (true)
useKerberos Boolean If set to 1, use Kerberos authentication. When set to 1, the KerberosConfigName is required.
Valid values:
  • 0 (false)
  • 1 (true)
useLDAP Boolean If set to 1, use LDAP.
Valid values:
  • 0 (false)
  • 1 (true)
user String The user name for the datasource. If defined, the password parameter must also be used.
useSSL Boolean If set to 1, use SSL authentication.
Valid values:
  • 0 (false)
  • 1 (true)
api_target_host String

Specifies the target hosts where the API executes. Valid values:
  • all_managed: execute on all managed units but not the central manager
  • all: execute on all managed units and the central manager
  • group:<group name>: execute on all managed units identified by <group name>
  • host name or IP address of a managed unit: specified from the central manager to execute on a managed unit.  For example, api_target_host=10.0.1.123.
  • host name or IP address of the central manager: specified from a managed unit to execute on the central manager. For example, api_target_host=10.0.1.123.

IP addresses must conform to the IP mode of your network. For dual IP mode, use the same IP protocol with which the managed unit is registered with the central manager. For example, if the registration uses IPv6, specify an IPv6 address. The hostname is independent of IP mode and can be used with any mode.

Examples

Use this command to change the datasource name from chickenDB2 to chicken DB2:

grdapi update_datasource_by_name name=chickenDB2 newName="chicken DB2"