Supprimer un groupe dédié

Vous pouvez supprimer un groupe dédié vide que vous avez créé et dont vous n’avez plus besoin.

Un groupe dédié peut être supprimé seulement s’il ne contient aucune VM ou Net. Autrement, vous devez forcer sa suppression.

Si vous forcer la suppression d’un groupe dédié :
- Toutes les VM dans le groupe dédié sont terminées. Pour en savoir plus, voir Terminer des VM.
- Tous les Nets dans le groupe dédié sont supprimés, et toutes les ressources attachées au Net sont détachées. Pour en savoir plus, voir Supprimer un Net.

Supprimer un groupe dédié avec OSC CLI

À ce jour, cette section est disponible en anglais uniquement.

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.

    • RequestId: The ID of the request.

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

Supprimer un groupe dédié avec oapi-cli

À ce jour, cette section est disponible en anglais uniquement.

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.
$ oapi-cli --profile "default" DeleteDedicatedGroup \
    --DedicatedGroupId "ded-12345678"
Request sample: Forcing the deletion of a dedicated group and all resources in it.
$ oapi-cli --profile "default" DeleteDedicatedGroup \
    --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.

    • RequestId: The ID of the request.

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

Pages connexes

Méthode API correspondante