Command Central 10.11 | Using the Command Line Interface | Configuration Commands | sagcc update configuration data
 
sagcc update configuration data
Updates the data for a specified configuration instance that belongs to a specified run-time component. For example, you can update the port number of a COMMON-PORTS configuration instance.
Syntax
*Command Central syntax:
sagcc update configuration data node_alias componentid instanceid   
[sharedsecret=text_string]           
{--input | -i} filename{.xml|.json|.properties} [options]
*Platform Manager syntax:
sagcc update configuration data componentid instanceid   
[sharedsecret=text_string]           
{--input | -i} filename{.xml|.json|.properties} [options]
             
 options: [{--debug | -d}]               
[{--error | -r} file]
[{--input-format | -m} content-type]               
[{--log | -l} file]               
[{--output-format | -m} content-type]               
[{--password | -p} password]               
[{--quiet | -q}]               
[{--server | -s} url]
[{--sync-job | -j}]               
[{--username | -u} user_name]
Arguments and Options
Argument or Option
Description
node_alias
Command Central only.
Required. Specifies the alias name of the installation in which the run-time component is installed.
You can view a list of installations and their aliases using sagcc list landscape nodes.
componentid
Required. Specifies the ID of the run-time component to which the instance you want to update belongs.
You can determine the IDs for run-time components using sagcc list inventory components.
instanceid
Required. Specifies the ID of the instance for which you want to update data.
You can determine the IDs for configuration instances using sagcc list configuration instances.
[sharedsecret=text_string]
Optional. Specify a shared secret password that Platform Manager uses to secure any passwords in the configuration data that you want to update.
If you omit this parameter, Platform Manager uses the shared secret defined for the environment or for the whole landscape. For more information, see sagcc add security credentials sharedsecret.

{--input | -i}

filename{.xml| .json| .properties}
Required. Identifies an input file that contains the updated configuration data. For more information, see input.
Note:
Some of the COMMON-* configuration types do not support all input file types (.xml, .json, or .properties) when creating a configuration instance. Although not specifically supported, if you use plain text, the server attempts to convert the data into a supported format.
[options]
Optional. Refer to the command syntax for a list of the options the command supports. For a description of the options, see Common Options.
Usage Notes
*To determine how to specify the data in the input file, use sagcc get configuration data to retrieve data for the configuration instance you are updating. For example, if you want to use an XML file to specify the data to update an instance of a COMMON-PORTS configuration type, use sagcc get configuration data with the --format xml option to retrieve the data for the COMMON-PORTS instance in XML format.
*The data in the input file must match the expected schema for the configuration type. You can use sagcc exec configuration validation update to validate input data that you want to use to update the configuration instance.
*You can retrieve schemas for common configuration types from a Platform Manager server and use the schemas to validate an XML input data file. To access the schemas, navigate to:
http(s)://hostname:port/spm/configuration/common/
Where hostname is the host name of the required Platform Manager server and port is the port number of the Platform Manager installation.
For example, to retrieve the log4j schema from a Platform Manager with host name “rubicon2” and port “8092”, navigate to:
https://rubicon:8092/spm/configuration/common/log4j.xsd
You can also use the sagcc get configuration common command to retrieve schemas for common configuration types.
*You can export a configuration from an installed product instance, managed by Command Central and use the exported configuration data in the input file. For more information, see Adding Configurations Exported from an Installed Product Instance to an Input File.
*When using an XML input data file to update a configuration instance, use the sagcc get configuration data command with the --output | -o filename.xml option to retrieve a copy of the XML input data file for the configuration instance you require.
After including the required updated data in the copy of the XML data file, you can use the sagcc update configuration data command to update the configuration instance.
*For information about the return statuses of the command, see Return Statuses from Executing Configuration Commands.
*You can specify the content type for the output data of the command either in the Accept header of the REST client or by adding the --output-format option. For example, if you add --ouput-format text, the command displays data on the console in plain text format. For more information, see output-format.
If you do not specify the content type for the output data, the command returns the default output format, XML.
Examples When Executing on Command Central
*The data to update a COMMON-PORTS instance is in the c:\inputs\port_data.xml file. To update the configuration instance with ID “COMMON-PORTS-com.softwareag.sshd.pid.properties” for the run-time component with ID “OSGI-SPM”, which is installed in the installation with alias name “sag01” using the authorization of the user with user name “Administrator” and password “manage”:
sagcc update configuration data sag01 OSGI-SPM COMMON-PORTS-              
com.softwareag.sshd.pid.properties --input c:\inputs\port_data.xml            
--username Administrator --password manage
*The Software AG_directory /profiles/CCE/configuration/security/user.txt file is updated with a new password that replaces the default Command Central administrator password. To update the modified user.txt file for the instance with ID “ENGINE SIN-INTERNAL-USERS-users.txt” and the run-time component with ID “OSGI-SPM”, which is installed in the installation with alias name “sag01”:
sagcc update configuration data sag01 OSGI-SPM-ENGINE SIN-INTERNAL-USERS-users.txt  --input
Software AG_directory/profiles/CCE/configuration/security/users.txt
*To update instance data for the configuration instance with ID “COMMON-PROXY” that belongs to the run-time component with ID “OSGI-SPM” and runs in the installation with alias name “sag01”, using “mysecret123” as the shared secret to secure the proxy configuration password, and save the updated configuration data with the encrypted password in the “configWithEncryptedData.xml” file:
sagcc update configuration data sag01 OSGI-SPM COMMON-PROXY   
sharedsecret=mysecret123  --input     
configWithEncryptedData.xml
*Because the {--server | -s} option is not specified, the command uses the default server. For more information, see server.
Example When Executing on Platform Manager
The data to update a COMMON-PORTS instance is in the c:\inputs\port_data.xml file. To update the configuration instance with ID “COMMON-PORTS-com.softwareag.sshd.pid.properties” for the run-time component that has the ID “OSGI-SPM” and is managed by the Platform Manager with host name “rubicon2” and port “8092”:
sagcc update configuration data OSGI-SPM COMMON-PORTS-         
com.softwareag.sshd.pid.properties --input c:\inputs\port_data.xml          
--server http://rubicon2:8092/spm --password secret
Because the {--username | -u} option is not specified, the command uses the default user name. For more information, see username. The command specifies “secret” for the user’s password.