前のトピック: Arcserve Backup との統合: add_bab_credentials()次のトピック: シナリオの削除: remove_scenario()


シナリオのプロパティの更新: update_scenario()

update_scenario API 関数を使用すると、実行時にシナリオ データを更新できます。

引数

update_scenario API 関数には、以下のテーブルに記述されている引数が含まれています。

名前

タイプ

説明

session_id

uint

create_session API をコールすることで返されたセッション ID。

scenario_id

uint

更新するシナリオ ID。

scenario_data_str

ref string

シナリオに関するデータ。 操作が正常に完了すると、新しいシナリオ データが提供されます。

why_not_reason

ref string

この API が失敗する時に、その失敗の理由が含まれます。

戻り値

戻り値は、XML 形式でシナリオのデータを提供します。

public bool update_scenario_example()
        {
            try
            {
                uint scenario_id = _scenario_id;
                string why_not_reason = "";
                string scenario_data_str = get_mng().get_scenario_data(scenario_id);
                //do some changes for  the scenario.
                return get_mng().update_scenario(_session_id, scenario_id, ref scenario_data_str, out why_not_reason);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
            return false;
        }