Deleting a Dedicated Group

You can delete an empty dedicated group you created and that you no longer need.

A dedicated group can be deleted only if no VM or Net is in the dedicated group. Otherwise, you need to force its deletion.

If you force the deletion of a dedicated group:
- All VMs in the dedicated group are terminated. For more information, see Terminating VMs.
- All Nets in the dedicated group are deleted, and all resources associated with the Nets are detached. For more information, see Deleting a Net.

Deleting a Dedicated Group Using OSC CLI

This feature is currently in beta.

The DeleteDedicatedGroup command deletes a specified dedicated group of virtual machines (VMs).

A dedicated group can be deleted only if no VM or Net is in the dedicated group. Otherwise, you need to force the deletion.
If you force the deletion:
- all VMs are terminated.
- all Nets are deleted, and all resources associated with Nets are detached.

Request sample: Deleting a dedicated group without any resource in it.
$ osc-cli api DeleteDedicatedGroup --profile "default" \
    --DedicatedGroupId "ded-12345678"
Request sample: Forcing the deletion of a dedicated group and all resources in it.
$ osc-cli api DeleteDedicatedGroup --profile "default" \
    --DedicatedGroupId "ded-12345678" \
    --Force True

This command contains the following attributes that you need to specify:

  • DedicatedGroupId: The ID of the dedicated group you want to delete.

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Force: (optional) If true, forces the deletion of the dedicated group and all its dependencies.

The DeleteDedicatedGroup command returns the following elements:

  • ResponseContext: Information about the context of the response.

Result sample
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Related Pages

Corresponding API Method