Command Central 10.5 | 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 might want to 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]               
[{--log | -l} file]               
[{--media-type | -m} content-type]               
[{--password | -p} password]               
[{--quiet | -q}]               
[{--server | -s} url]               
[{--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:
Based on the type of configuration instance you are attempting to create, all file types (.xml, .json, and .properties) might not be supported.
When updating instances of common configuration types, XML, json, and properties are all supported types of the input file. However, all of these file types might not be supported when creating instances of a product-specific configuration type.
Tip:
To determine how to specify the data in the input file, use sagcc get configuration data to retrieve data for the configuration instance you want to update. 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.
[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
*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. You can use the schemas to validate an XML input data file. The schemas are available from a Platform Manager. For example, you might use the following to retrieve the log4j schema from a Platform Manager with host name “rubicon2” and port “8092”:
http://rubicon:8092/spm/configuration/common/log4j.xsd
You can also us sagcc get configuration common to retrieve schemas for common configuration types.
*You can retrieve schemas for common configuration types. The schemas are available from a Platform Manager using the following where hostname is the host name of a Platform Manager server and port is its port number:
http://hostname:port/spm/configuration/common/
You can also us sagcc get configuration common to retrieve schemas for common configuration types.
*You can specify the content type for the output data for 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.
*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.
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.