Modifying a User

Using OSC CLI and AWS CLI, you can modify the name and/or the path of a specified user.

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" \
    --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.

  • 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.

    • UserId: The ID of the EIM user.

    • UserName: The name of the EIM user.

Result sample
{
  "User": {
    "UserName": "test-user",
    "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
    "Path": "/product/"
  },
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Modifying a User Using 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.

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.