Previous Topic: Updating Scenario Properties: update_scenario()Next Topic: Importing Scenarios: import_scenario()


Removing Scenarios: remove_scenario()

The remove_scenario API function lets you remove scenarios from the Control Service.

Arguments

The remove_scenario API function includes the arguments described in the following table:

Name

Type

Description

session_id

uint

The session ID that was returned by calling the create_session API.

scenario_id

uint

The scenario ID that will run.

arc_upd

bool

This parameter applies to only Arcserve Backup integrated scenarios.

why_not-reason

out string

Contains the reason for failure when this API fails.

Return Value

The return type is Boolean. When the return value is true, the API completed successfully. When the return value is false, the API did not complete successfully. If the return value is false, review the message to determine the reason the API failed.

Example

public bool remove_scenario_example()
        {
            try
            {
                uint scenario_id = _scenario_id;
                bool arc_integrated = false;
                string why_not_reason = "";
                return get_mng().remove_scenario(_session_id, scenario_id, arc_integrated, out why_not_reason);
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
            return false;
        }