modify_named_credential

Updates an existing named credential. You can provide input parameters using command line arguments or an input properties file. It also supports the input_file tag for passwords and parameter values.

Format

 emcli modify_named_credential         -cred_name=<name>        -new_cred_name<name>        -cred_type=<credential_type>        -cred_scope=<credential_scope>        -cred_desc=<credential_description>        -target_name=<target_name>        -target_type=<target_type>
        -test 
        -test_target_name=<test_target_name>
        -test_target_type=<test_target_type>
        -input_file=<tag|value>        -properties_file=<filename>        -attributes=<p1:v1;p2:v2;...>
        -remove_old_attributes

Options

  • cred_name

    Credential name, such as MyBackUpCreds. This is required if you do not use the properties_file option.

  • new_cred_name

    New credential name.

  • cred_type

    Credential type.

  • cred_scope

    Possible values are global instance. The default is global.

  • cred_desc

    Credential description.

  • target_name

    This is required when cred_scope is instance.

  • target_type

    This is required when cred_scope is instance.

  • test

    Use this option to test the credential before saving.

  • test_target_name

    Use this option to supply the target name to test a global credential. This is mandatory when the scope is global and the test option is used.

  • test_target_type

    Use this option to supply the target type to test a global credential. This is mandatory when the scope is global and the test option is used.

  • input_file

    Use this option to supply sensitive property values from the file.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

  • properties_file

    Use this option to pass all parameters from the file. Values given on the command line take precedence.

  • attributes

    Specify credential columns as follows:

    colname:colvalue;colname:colvalue
    

    You can change the separator value using -separator=attributes=<newvalue>, and you can change the subseperator value using -subseparator=attributes=<newvalue>.

  • remove_old_attributes

    Unsets all existing credential column values.

Examples

Example 1

This example updates credentials to foo and bar:

emcli modify_named_credential
        -cred_name=NC1
        -attributes="HostUserName:foo;HostPassword:bar"

Example 2

This example reads the password from the mypasswordfile.txt file.

emcli modify_named_credential
        -cred_name=NC1 
        -attributes="HostUserName:foo;HostPassword:tag"
        -input_file="tag:mypasswordfile.txt"