Ajouter ou retirer un utilisateur d’un groupe

Vous pouvez ajouter un utilisateur à un groupe et le retirer à tout moment. Un utilisateur peut appartenir à plusieurs groupes en même temps, et le nombre d’utilisateurs dans un groupe n’est pas limité.

Vous pouvez ensuite ajouter au groupe une politique incluse ou y attacher une politique gérée, qui est ensuite appliquée à l’ensemble de ses utilisateurs.

Ajouter ou retirer un utilisateur avec Cockpit

Ajouter un utilisateur à un groupe

  • Vous pouvez également gérer l’appartenance à un groupe depuis le dashboard Utilisateurs EIM. Placez le curseur de la souris sur le rang de l’utilisateur que vous voulez ajouter à un groupe, cliquez sur le menu d’actions IconDotMenu, puis cliquez sur IconManage Modifier des groupes EIM.

  • Vous pouvez également ajouter un utilisateur lors de la création d’un groupe. Pour en savoir plus, voir Créer un groupe.

  1. Dans le dashboard Groupes EIM, placez le curseur de la souris sur le rang du groupe auquel vous voulez ajouter un utilisateur et cliquez sur le menu d’actions IconDotMenu.
    Un menu déroulant apparaît.

  2. Cliquez sur IconManage Gérer des utilisateurs EIM.
    La boîte de dialogue GÉRER DES UTILISATEURS EIM apparaît.

  3. Dans la liste Utilisateurs, sélectionnez un ou plusieurs utilisateurs que vous voulez ajouter au groupe.

  4. Cliquez sur Modifier.
    L’utilisateur est ajouté au groupe.

Retirer un utilisateur d’un groupe

Vous pouvez également gérer l’appartenance à un groupe depuis le dashboard Utilisateurs EIM. Placez le curseur de la souris sur le rang de l’utilisateur que vous voulez retirer d’un groupe, cliquez sur le menu d’actions IconDotMenu, puis cliquez sur IconManage Modifier des groupes EIM.

  1. Dans le dashboard Groupes EIM, placez le curseur de la souris sur le rang du groupe duquel vous voulez retirer un utilisateur et cliquez sur le menu d’actions IconDotMenu.
    Un menu déroulant apparaît.

  2. Cliquez sur IconManage Gérer des utilisateurs EIM.
    La boîte de dialogue GÉRER DES UTILISATEURS EIM apparaît.

  3. Dans la liste Utilisateurs, cliquez sur IconClose à côté de l’utilisateur que vous voulez retirer du groupe.

    Vous pouvez retirer plusieurs utilisateurs à la fois.

  4. Cliquez sur Modifier.
    L’utilisateur est retiré du groupe.

Ajouter ou retirer un utilisateur avec octl

Ajouter un utilisateur à un groupe

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

The AddUserToUserGroup command adds a user to a specified group.

Request sample
$ octl iaas api AddUserToUserGroup --profile "default" \
  --UserGroupName "example-usergroup" \
  --UserGroupPath "/example/" \
  --UserName "example-user" \
  --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to add a user to.

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

  • UserName: The name of the user you want to add to the group.

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

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

Retirer un utilisateur d’un groupe

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

The RemoveUserFromUserGroup command removes a specified user from a specified group.

Request sample
$ octl iaas api RemoveUserFromUserGroup --profile "default" \
  --UserGroupName "example-usergroup" \
  --UserGroupPath "/example/" \
  --UserName "example-user" \
  --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to remove the user from.

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

  • UserName: The name of the user you want to remove from the group.

  • UserPath: (optional) The path to the user (by default, /).

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

Ajouter ou retirer un utilisateur avec OSC CLI

Ajouter un utilisateur à un groupe

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

The AddUserToUserGroup command adds a user to a specified group.

Request sample
$ osc-cli api AddUserToUserGroup --profile "default" \
    --UserGroupName "example-usergroup" \
    --UserGroupPath "/example/" \
    --UserName "example-user" \
    --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to add a user to.

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

  • UserName: The name of the user you want to add to the group.

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

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

Retirer un utilisateur d’un groupe

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

The RemoveUserFromUserGroup command removes a specified user from a specified group.

Request sample
$ osc-cli api RemoveUserFromUserGroup --profile "default" \
    --UserGroupName "example-usergroup" \
    --UserGroupPath "/example/" \
    --UserName "example-user" \
    --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to remove the user from.

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

  • UserName: The name of the user you want to remove from the group.

  • UserPath: (optional) The path to the user (by default, /).

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

Ajouter ou retirer un utilisateur avec oapi-cli

Ajouter un utilisateur à un groupe

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

The AddUserToUserGroup command adds a user to a specified group.

Request sample
$ oapi-cli --profile "default" AddUserToUserGroup \
    --UserGroupName "example-usergroup" \
    --UserGroupPath "/example/" \
    --UserName "example-user" \
    --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to add a user to.

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

  • UserName: The name of the user you want to add to the group.

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

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

Retirer un utilisateur d’un groupe

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

The RemoveUserFromUserGroup command removes a specified user from a specified group.

Request sample
$ oapi-cli --profile "default" RemoveUserFromUserGroup \
    --UserGroupName "example-usergroup" \
    --UserGroupPath "/example/" \
    --UserName "example-user" \
    --UserPath "/example/"

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

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

  • UserGroupName: The name of the group you want to remove the user from.

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

  • UserName: The name of the user you want to remove from the group.

  • UserPath: (optional) The path to the user (by default, /).

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

Ajouter ou retirer un utilisateur avec AWS CLI

Avant de commencer : Installez et configurez AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

Ajouter un utilisateur à un groupe

Pour ajouter un utilisateur à un groupe, utilisez la commande add-user-to-group en suivant cette syntaxe :

Exemple de requête
$ aws iam add-user-to-group \
    --profile YOUR_PROFILE \
    --group-name GROUP_NAME \
    --user-name USER_NAME \
    --endpoint https://eim.eu-west-2.outscale.com

Cette commande contient les options suivantes que vous devez spécifier :

  • (optionnel) profile : Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

  • group-name : Le nom du groupe auquel vous voulez ajouter un utilisateur.

  • user-name : Le nom de l’utilisateur que vous voulez ajouter au groupe.

  • endpoint : Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.

L’utilisateur est ajouté au groupe spécifié.

Retirer un utilisateur d’un groupe

Pour retirer un utilisateur d’un groupe, utilisez la commande remove-user-from-group en suivant cette syntaxe :

Exemple de requête
$ aws iam remove-user-from-group \
    --profile YOUR_PROFILE \
    --group-name GROUP_NAME \
    --user-name USER_NAME \
    --endpoint https://eim.eu-west-2.outscale.com

Cette commande contient les options suivantes que vous devez spécifier :

  • (optionnel) profile : Le profil nommé que vous voulez utiliser, créé pendant la configuration d’AWS CLI. Pour en savoir plus, voir Installer et configurer AWS CLI.

  • group-name : Le nom du group dont vous voulez retirer un utilisateur.

  • user-name : Le nom de l’utilisateur que vous voulez retirer du groupe.

  • endpoint : Le endpoint correspondant à la Région à laquelle vous voulez envoyer la requête. Pour en savoir plus, voir Installer et configurer AWS CLI.

L’utilisateur est retiré du groupe spécifié.

Pages connexes

Méthodes API correspondantes

AWS™ et Amazon Web Services™ sont des marques de commerce d'Amazon Technologies, Inc. ou de ses affiliées aux États-Unis et/ou dans les autres pays.