Modifier un groupe
Avec OSC CLI et AWS CLI, vous pouvez modifier le nom et/ou le chemin d’un groupe que vous spécifiez.
Modifier un groupe avec OSC CLI
|
À ce jour, cette section est disponible en anglais uniquement. |
The UpdateUserGroup command modifies the name and/or the path of a specified group.
$ 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. -
OutscaleLoginAllowed: Whether the user is allowed to log in to Cockpit v2 using its Outscale credentials when identity federation is activated. -
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.
-
{
"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"
}
]
}
Modifier un groupe avec oapi-cli
|
À ce jour, cette section est disponible en anglais uniquement. |
The UpdateUserGroup command modifies the name and/or the path of a specified group.
$ 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. -
OutscaleLoginAllowed: Whether the user is allowed to log in to Cockpit v2 using its Outscale credentials when identity federation is activated. -
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.
-
{
"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"
}
]
}
Modifier un groupe 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 groupe, utilisez la commande update-group en suivant cette syntaxe :
$ 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 \
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 que vous souhaitez modifier. -
(optionnel)
new-path: Le nouveau chemin pour le groupe. -
(optionnel)
new-group-name: Le nouveau nom pour le groupe.Ce nom doit être unique et doit contenir entre 1 et 128 caractères. Les caractères autorisés sont a-z, A-Z, 0-9 et +=,.@-_.
-
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 nom et/ou le chemin du groupe sont modifiés.
Pages connexes
Méthode API correspondante
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.