Modifying a User

Using OSC CLI and AWS CLI, you can modify the name and/or the path of a specified user. Using Cockpit v2, you can also modify his email address.

Modifying a User Using Cockpit v2

  1. In the EIM Users dashboard, check the box of the user you want to modify.
    The user is selected.

  2. Click IconEdit Update EIM User.
    The UPDATE EIM USER dialog box appears.

  3. (optional) In the Name field, type the name you want to give the user.

    This name must be unique and must contain between 1 and 64 characters. Allowed characters are a-z, A-Z, 0-9, and +=,.@-_.

  4. (optional) In the Email field, type the email of the user.

    Only the root user can edit this field.

  5. (optional) In the Path field, type a path to indicate where the user is within your organization.

    This name must begin and end with a slash (/), and contain between 1 and 512 alphanumeric characters and/or slashes (/), or underscores (_).

  6. Click Update.
    The user is modified.

Modifying a User Using OSC CLI

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

Modifying a User Using oapi-cli

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

Modifying a User Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To modify the name and/or the path of a specified user, use the update-user command following this syntax:

Request sample
$ 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

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.

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

    This name must be unique and must contain between 1 and 64 characters. Allowed characters are a-z, A-Z, 0-9, and +=,.@-_.

  • (optional) new-path: The new path for the user.

  • (optional) new-user-name: The new name for the user.

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

The path and/or the name of the specified user are modified.

Related Pages

Corresponding API Methods

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