Modifying a Group

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

Modifying a Group Using OSC CLI

The UpdateUserGroup command modifies the name and/or the path of a specified group.

Request sample
$ osc-cli api UpdateUserGroup --profile "default" \
    --NewPath "/new-path/" \
    --NewUserGroupName "new-usergroup" \
    --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.

  • NewPath: (optional) A new path for the group. If not specified, it is set to a slash (/).

  • NewUserGroupName: (optional) A new name for the user group.

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

The UpdateUserGroup command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • UserGroup: Information about the user group.

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

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

    • Name: The name of the user group.

    • Orn: The Outscale Resource Name (ORN) of the user group. For more information, see Resource Identifiers.

    • Path: The path to the user group.

    • UserGroupId: The ID of the user group.

  • Users: A list of EIM users.

    • 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
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "UserGroup": {
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "LastModificationDate": "2010-10-01T12:34:56.789Z",
    "Name": "new-usergroup",
    "Orn": "orn:ows:idauth::012345678910:usergroup/example/usergroup-example",
    "Path": "/new-path/",
    "UserGroupId": "ug-12345678"
  },
  "Users": [
    {
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "LastModificationDate": "2010-10-01T12:34:56.789Z",
      "Path": "/example/",
      "UserEmail": "user@example.com",
      "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
      "UserName": "example-user"
    }
  ]
}

Modifying a Group Using oapi-cli

The UpdateUserGroup command modifies the name and/or the path of a specified group.

Request sample
$ oapi-cli --profile "default" UpdateUserGroup \
    --NewPath "/new-path/" \
    --NewUserGroupName "new-usergroup" \
    --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.

  • NewPath: (optional) A new path for the group. If not specified, it is set to a slash (/).

  • NewUserGroupName: (optional) A new name for the user group.

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

The UpdateUserGroup command returns the following elements:

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • UserGroup: Information about the user group.

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

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

    • Name: The name of the user group.

    • Orn: The Outscale Resource Name (ORN) of the user group. For more information, see Resource Identifiers.

    • Path: The path to the user group.

    • UserGroupId: The ID of the user group.

  • Users: A list of EIM users.

    • 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
{
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  },
  "UserGroup": {
    "CreationDate": "2010-10-01T12:34:56.789Z",
    "LastModificationDate": "2010-10-01T12:34:56.789Z",
    "Name": "new-usergroup",
    "Orn": "orn:ows:idauth::012345678910:usergroup/example/usergroup-example",
    "Path": "/new-path/",
    "UserGroupId": "ug-12345678"
  },
  "Users": [
    {
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "LastModificationDate": "2010-10-01T12:34:56.789Z",
      "Path": "/example/",
      "UserEmail": "user@example.com",
      "UserId": "ABCDEFGHIJKLMNOPQRSTUVWXYZ12345",
      "UserName": "example-user"
    }
  ]
}

Modifying a Group 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 group, use the update-group command following this syntax:

Request sample
$ aws iam update-group \
    --profile YOUR_PROFILE \
    --group-name GROUP_NAME \
    --new-path /NEW_PATH/NEW_SUB_PATH/ \
    --new-group-name NEW_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 modify.

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

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

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

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

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

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.