Previous page

Next page

Locate page in Contents

Print this page

Destroying a Container

To destroy a Container, use the vzaenvmBinding.destroy() method. The method accepts the Server ID of the Container as a single parameter.

/// <summary>

/// Sample function DestroyCT.

/// Destroys a Container.

/// </summary>

/// <param name="ve_eid">Server ID of the Container.</param>

/// <returns>"OK" or error information.</returns>

public string DestroyCT(string ve_eid)

{

    try {

        vzaenvmBinding env = (vzaenvmBinding)binder.InitBinding(typeof(vzaenvmBinding));

        destroy destroy_input = new destroy();

        // Set the Server ID.

        destroy_input.eid = ve_eid;

        env.destroy(destroy_input);

        return "The Container has been destroyed.";

    }

    catch (Exception e) {

        return "Exception: " + e.Message;

    }

}

Please send us your feedback on this help page