modify_named_credential

既存の名前付き資格証明を更新します。コマンドラインの引数または入力プロパティ・ファイルを使用すると、入力パラメータを指定できます。パスワードとパラメータ値のためのinput_fileタグもサポートしています。

書式

 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

オプション

  • cred_name

    MyBackUpCredsなどの資格証明の名前。properties_fileオプションを使用しない場合、これが必要です。

  • new_cred_name

    新しい資格証明の名前。

  • cred_type

    資格証明のタイプ。

  • cred_scope

    使用可能な値は、global instanceです。デフォルトはglobalです。

  • cred_desc

    資格証明の説明。

  • target_name

    cred_scopeがインスタンスである場合、必要です。

  • target_type

    cred_scopeがインスタンスである場合、必要です。

  • test

    このオプションを使用して、資格証明を保存する前にテストします。

  • test_target_name

    このオプションを使用して、ターゲット名を指定しグローバル資格証明をテストします。範囲がグローバルで、testオプションを使用する場合、必須です。

  • test_target_type

    このオプションを使用して、ターゲット・タイプを指定しグローバル資格証明をテストします。範囲がグローバルで、testオプションを使用する場合、必須です。

  • input_file

    このオプションを使用して、ファイルから機密プロパティ値を指定します。

    input_fileパラメータの詳細は、「-input_fileの構文ガイドライン」を参照してください。

  • properties_file

    このオプションを使用して、ファイルのすべてのパラメータを渡します。コマンドラインで指定した値が優先されます。

  • attributes

    次のように資格証明列を指定します。

    colname:colvalue;colname:colvalue
    

    -separator=attributes=<newvalue>を使用すると、セパレータ値を変更でき、-subseparator=attributes=<newvalue>を使用すると、サブセパレータ値を変更できます。

  • remove_old_attributes

    既存の資格証明の列値をすべて設定解除します。

例1

この例では、資格証明をfooとbarに更新します。

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

例2

この例では、mypasswordfile.txtファイルからパスワードを読み取ります。

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