Modifier un utilisateur

Avec OSC CLI et AWS CLI, vous pouvez modifier le nom et/ou le chemin d’un utilisateur que vous spécifiez. Avec Cockpit v2, vous pouvez également modifier son adresse e-mail.

Modifier un utilisateur avec Cockpit v2

  1. Dans le dashboard EIM Users, cochez la case de l’utilisateur que vous voulez modifier.
    L’utilisateur est sélectionné.

  2. Cliquez sur IconEdit Modifier un utilisateur EIM.
    La boîte de dialogue MODIFIER UN UTILISATEUR EIM apparaît.

  3. (optionnel) Dans le champ Nom, tapez le nom que vous voulez donner à l’utilisateur.

    Ce nom doit être unique et doit contenir entre 1 et 64 caractères. Les caractères autorisés sont a-z, A-Z, 0-9 et +=,.@-_.

  4. (optionnel) Dans le champ E-mail, tapez l’e-mail de l’utilisateur.

    Seul l’utilisateur root peut éditer ce champ.

  5. (optionnel) Dans le champ Chemin d’accès, tapez un chemin pour indiquer la position de l’utilisateur dans votre organisation.

    Ce nom doit commencer et finir par une barre oblique (/), et contenir entre 1 et 512 caractères alphanumériques et/ou barres obliques (/), ou tirets bas (_).

  6. Cliquez sur Modifier.
    L’utilisateur est modifié.

Modifier un utilisateur avec OSC CLI

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

The UpdateUser command modifies the name and/or the path of a specified EIM user.

Request sample
$ osc-cli api UpdateUser --profile "default" \
    --UserName "example-user" \
    --NewUserEmail "user@example.com" \
    --NewUserName "test-user" \
    --NewPath "/product/"

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.

  • NewPath: (optional) A new path for the EIM user.

  • NewUserEmail: (optional) A new email address for the EIM user.

  • NewUserName: (optional) A new name for the EIM user.

  • UserName: The name of the EIM user you want to modify.

The UpdateUser command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • User: Information about the EIM user.

    • CreationDate: The date and time (UTC) of creation of the EIM user.

    • LastModificationDate: The date and time (UTC) of the last modification of the EIM user.

    • Path: The path to the EIM user.

    • UserEmail: The email address of the EIM user.

    • UserId: The ID of the EIM user.

    • UserName: The name of the EIM user.

Result sample
{
  "User": {
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "LastModificationDate": "2017-05-10T12:34:56.789+0000",
    "UserEmail": "user@example.com",
    "UserName": "test-user",
    "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
    "Path": "/product/"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Modifier un utilisateur avec oapi-cli

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

The UpdateUser command modifies the name and/or the path of a specified EIM user.

Request sample
$ oapi-cli --profile "default" UpdateUser \
    --UserName "example-user" \
    --NewUserEmail "user@example.com" \
    --NewUserName "test-user" \
    --NewPath "/product/"

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.

  • NewPath: (optional) A new path for the EIM user.

  • NewUserEmail: (optional) A new email address for the EIM user.

  • NewUserName: (optional) A new name for the EIM user.

  • UserName: The name of the EIM user you want to modify.

The UpdateUser command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • User: Information about the EIM user.

    • CreationDate: The date and time (UTC) of creation of the EIM user.

    • LastModificationDate: The date and time (UTC) of the last modification of the EIM user.

    • Path: The path to the EIM user.

    • UserEmail: The email address of the EIM user.

    • UserId: The ID of the EIM user.

    • UserName: The name of the EIM user.

Result sample
{
  "User": {
    "CreationDate": "2010-10-01T12:34:56.789+0000",
    "LastModificationDate": "2017-05-10T12:34:56.789+0000",
    "UserEmail": "user@example.com",
    "UserName": "test-user",
    "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
    "Path": "/product/"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Modifier un utilisateur avec AWS CLI

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

Pour modifier le nom et/ou le chemin d’un utilisateur, utilisez la commande update-user en suivant cette syntaxe :

Exemple de requête
$ aws iam update-user \
    --profile YOUR_PROFILE \
    --user-name USER_NAME \
    --new-path /NEW_PATH/NEW_SUB_PATH/ \
    --new-user-name NEW_USER_NAME \
    --endpoint https://eim.eu-west-2.outscale.com

Cette commande contient les attributs suivants 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.

  • user-name : Le nom de l’utilisateur que vous souhaitez modifier.

    Ce nom doit être unique et doit contenir entre 1 et 64 caractères. Les caractères autorisés sont a-z, A-Z, 0-9 et +=,.@-_.

  • (optionnel) new-path : Le nouveau chemin pour l’utilisateur.

  • (optionnel) new-user-name : Le nouveau nom pour l’utilisateur.

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

Le chemin et/ou le nom de l’utilisateur que vous avez spécifié sont modifiés.

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.