Deleting a Group

You can delete a group of users in you account that you no longer need. You can the reuse the name of the group for another new group.

This action does not delete users or policies, as you need to delete them individually. For more information, Deleting a User or Deleting a Managed Policy.

Deleting a Group Using Cockpit v2

  1. In the EIM Groups dashboard, check the box of the group you want to delete.
    The group is selected.

  2. Click IconTerminate Delete.
    A confirmation dialog box appears.

  3. In the confirmation dialog box, type "DELETE" in the text field and click Delete.
    The group is deleted.

Deleting a Group Using OSC CLI

The DeleteUserGroup command deletes a specified user group.

The user group must be empty of any user and must not have any linked policy. Otherwise, you need to force the deletion.
If you force the deletion, all inline policies will be deleted with the user group.

Request sample
$ osc-cli api DeleteUserGroup --profile "default" \
    --Force False \
    --Path "/example/" \
    --UserGroupName "example-usergroup"

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

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

  • Force: (optional) If true, forces the deletion of the user group even if it is not empty.

  • Path: (optional) The path to the group. If not specified, it is set to a slash (/).

  • UserGroupName: The name of the group you want to delete.

The DeleteUserGroup 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"
  }
}

Deleting a Group Using oapi-cli

The DeleteUserGroup command deletes a specified user group.

The user group must be empty of any user and must not have any linked policy. Otherwise, you need to force the deletion.
If you force the deletion, all inline policies will be deleted with the user group.

Request sample
$ oapi-cli --profile "default" DeleteUserGroup \
    --Force False \
    --Path "/example/" \
    --UserGroupName "example-usergroup"

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

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

  • Force: (optional) If true, forces the deletion of the user group even if it is not empty.

  • Path: (optional) The path to the group. If not specified, it is set to a slash (/).

  • UserGroupName: The name of the group you want to delete.

The DeleteUserGroup 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"
  }
}

Deleting a Group Using AWS CLI

Before you begin:

To delete a group, use the delete-group command following this syntax:

Request sample
$ aws iam delete-group \
    --profile YOUR_PROFILE \
    --group-name GROUP_NAME \
    --endpoint https://eim.eu-west-2.outscale.com

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

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • group-name: The name of the group you want to delete.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The specified group is deleted from your account.

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.